what does javascript ! mean code example
Example 1: what does the ... mean in javascript
const x = [1,2,3,4,5];
Math.max(x) // NaN
Math.max(...x) // 5
// Math.max(...x) = Math.max(1,2,3,4,5)
Example 2: javascript % meaning
// % is the modulo operator
// It returns the rest of a division
// Example uses:
27 % 5
// returns 2, as 27/2 is 5 with rest 2.
99 % 13
// returns 8, as 99/13 is 7 with rest 8.
420 % 0
// returns NaN, as division by 0 is not calculatable.