JavaScript Tips, Ticks, and Best Practices

TLDRUsing Numeric Separators is one of the most used operators when I have to deal with large numbers. Always use semi-colons for line termination. Use splice instead of using delete to remove an item from an array. Using delete will remove the object, but will not reindex the array or update its length.

5m read time From apoorvtyagi.tech
Post cover image
Table of contents
1. Use Numeric Separators2. Always Use Semicolons3. Don’t forget "var"4. Delete vs Splice5. map vs for loop6. Rounding numbers7. Use console.table8. Avoid using try-catch inside a loop9. Multiple condition checking10. Double NOT bitwise operator (~~)Conclusion
6 Comments

Sort: