Here are 5 things I hoped I knew from the beginning:
1) No matter how fancy or popular a new framework or library might be nothing can beat vanilla/simple javascript. Always solve a problem using best possible and efficient approach and not simply by simply following new framework or libraries because they go out of date quite often or npm modules undergo breaking changes most of the times. It is better to keep modules up to date and code maintainable rather than trying to fix bugs at last moment.
2)It is always better to release build to QA or production in the middle of the week rather than delaying it till Fridays and spending your weekends at office.
3)You need to be up to date about latest syntax,features and libraries. So following relevant technical publications on medium, glancing through questions on quora, joining relevant technical groups on facebook and even opening hashnode feed daily or once a week can help you stay relevant on variety of topics.
4)Never try to multitask unless and until you can do it effectively. It is always better to stay focused on one problem/module at a time rather than trying to do many things simultaneously.
5)Every programmers has some "power hours" in a day where they have maximum focus and can be most productive. Some might be night owls and others might be early risers. Irrespective of the times try to figure out solutions to complex/difficult parts of your projects in this hours and then do menial tasks like attending meetings, interacting with team members and other trivial programming tasks later.