Hacker News new | ask | show | jobs
by edwinjm 3659 days ago
"This specification also includes support for a new exponentiation operator and adds a new method to Array.prototype called includes."

Not much new here for regular JavaScript developers.

1 comments

Everything about this is for regular JS developers:

Exponentiation operator:

    2 ** 32
is much friendlier to write than Math.pow(2, 32) or

    x **= 2
versus x = Math.pow(x, 32).

Array.prototype.includes: if (['jim', 'bob', 'dave'].includes('bob')) { console.log('We have a party, now.') } versus using for/in, for/of, map/reduce or much more commonly importing JQuery/Underscore/Lodash/some other random npm package for this functionality.

Both are small improvements, but both are squarely for "regular JavaScript developers".