30秒学会 JavaScript 片段 – isOdd
Returns true if the given number is odd, false otherwise. Checks whether a number is odd or even usi...
Returns true if the given number is odd, false otherwise. Checks whether a number is odd or even usi...
Creates an object with the same keys as the provided object and values generated by running the prov...
Returns the angle (theta) between two vectors. Use Array.prototype.reduce(), Math.pow() and Math.sqr...
Removes HTML/XML tags from string. Use a regular expression to remove HTML/XML tags from a string.
Negates a predicate function. Take a predicate function and apply the not operator (!) to it with it...
Converts a comma-separated values (CSV) string to a 2D array of objects. The first row of the string...
Extends a 3-digit color code to a 6-digit color code. Use Array.prototype.map(), String.prototype.sp...
Filters out all values from an array for which the comparator function does not return true. Use Arr...
Initializes an array containing the numbers in the specified range (in reverse) where start and end ...
Detects whether the website is being opened in a mobile device or a desktop/laptop. Use a regular ex...