Filter Unique Values
The Set object type was introduced in ES6, and along with (...), the spread operator, we can use it to create a new...
For further actions, you may consider blocking this person and/or reporting abuse
Hi, while the conversion hacks are interesting, PLEASE note in bold (as with
Math.*
) that proper readable methods should be used. It's really cryptic in the real life code to decode these tricks because people think this is the only and proper way instead of these:nice corrections, thank you.
Beware - truncating an integer and using any of
Math.floor
,Math.ceil
, andMath.round
are NOT the same thing:It's better to format json with spaces:
JSON.stringify({}, null, 2)
yea, it also good one.
Hi,
In the first example, the result includes an extra element:
4
In the "Every and Some" paragraph
more_random_numbers.some(isPositive)
returnstrue
😉Thx for the correction bro
wow, i am using js for years, but the
float to int
is new, thanks mani hope this posting helpfull for u bro, thx!
There's a typo in Convert to Boolean code section. It should be:
console.log(typeof isTrue) instead of:
console.log(typeof true)
Thx for correction bro