June 13, 2018I was reently mentoring someone who had trouble with the .reduce() method in JavaScript. Namely, how you get from this:
const nums = [1, 2, 3]
let value = 0for (let i = 0; i < nums.length; i++) {
value += nums[i]
}
…to this:
const nums = [1, 2, 3]
const value = nums.reduce((ac, next) => ac + next, 0)
Th...
January 25, 2017One of the things I appreciate about JavaScript is its versatility. JavaScript gives you the opportunity to use object oriented programming, imperative programming, and even functional programming. And you can go back and forth among them depending on your current needs and the preferences and expectations of your team...
March 29, 2016This article was peer reviewed by Panayiotis Velisarakos, Tim Severien and Dan Prince. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be!
With all the talk about workflows that support the amazing new features in ECMAScript 6, it’s easy to forget that ECMAScript 5 broug...
Recent Comments