1 minute read
A real math operator for exponents! How'd it take so many years?
var calculatedNumber = 2**4 calculatedNumber // 16
What else got included this year? (I'm sorry--this joke is too easy!)
Remember the .includes function introduced for Strings in ES2015? Well, ES2016 capitalizes on that victory by adding a .includes method that works exactly as the String method does, except on Arrays!
var nums = [1,2,3,4,5] nums.includes(2) // true nums.includes(7) // false