Category: JavaScript functions

ES6 Arrow Functions: Fat and Concise Syntax in JavaScript

Arrow functions were introduced with ES6 as a new syntax for writing JavaScript functions. They save developers time and simplify function scope. Surveys show they’re the most popular ES6 feature: Source: Axel Rauschmayer survey on favorite ES6 features Source: Ponyfoo’s survey on the most commonly used ES6 featu...

15 Ways to Write Self-documenting JavaScript

Isn’t it fun to find a comment in code that’s completely out of place and useless? It’s an easy mistake to make: you change some code, and forget to remove or update the comment. A bad comment won’t break your code, but imagine what would happen when debugging. You read the comment. It says one...

Measuring JavaScript Functions’ Performance

Performance has always played a crucial part in software. On the web, performance is even more important as our users can easily change website and visit one of our competitors if we offer them slow pages. As professional web developers, we have to take this issue into account. A lot of old web performance optimization...