30秒学会 JavaScript 片段 – isEven
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...
Returns a random element from an array. Use Math.random() to generate a random number, multiply it b...
Calculates the Hamming distance between two values. Use the XOR operator (^) to find the bit differe...
title: flip tags: function,intermediate Flip takes a function as an argument, then makes the first a...
Returns the sum of the powers of all the numbers from start to end (both inclusive). Use Array.proto...
Retrieve a set of properties indicated by the given selectors from an object. Use Array.prototype.ma...
Calculates the midpoint between two pairs of (x,y) points. Destructure the array to get x1, y1, x2 a...
Casts the provided value as an array if it’s not one. Use Array.prototype.isArray() to determi...
Gets the size of an array, object or string. Get type of val (array, object or string). Use length p...
Returns true if the specified value is null, false otherwise. Use the strict equality operator to ch...