30秒学会 JavaScript 片段 – aperture
Returns an array of n-tuples of consecutive elements. Use Array.prototype.slice() and Array.prototyp...
Returns an array of n-tuples of consecutive elements. Use Array.prototype.slice() and Array.prototyp...
Creates an object from the given key-value pairs. Use Array.prototype.reduce() to create and combine...
Returns the standard deviation of an array of numbers. Use Array.prototype.reduce() to calculate the...
Returns the current URL. Use window.location.href to get the current URL.
Flattens an array up to the specified depth. Use recursion, decrementing depth by 1 for each level o...
Check if a date is the same as another date. Use Date.prototype.toISOString() and strict equality ch...
Returns true if both arguments are true, false otherwise. Use the logical and (&&) operator ...
Converts an angle from degrees to radians. Use Math.PI and the degree to radian formula to convert t...
Returns the average of two or more numbers. Use Array.prototype.reduce() to add each value to an acc...
Returns every nth element in an array. Use Array.prototype.filter() to create a new array that conta...