JavaScript is a full-fledged dynamic programming language that can add interactivity to a website. It is beginner-friendly and provides many tools that can save a lot of effort and time if used correctly. These are the 10 such tricks you should know while working with JavaScript.
Table of contents
1. Console Log like a Pro2. Object Short-hand properties3. Logical Assignment Operators4. Spread operator5. Self-Invoking functions6. Format numbers to a currency7. use === instead of ==8. Swap ’em variables9. Empty or resize an array using length10. The ternary operator (?)5 Comments
Sort: