30秒学会 JavaScript 片段 – createElement
Creates an element from a string (without appending it to the document). If the given string contain...
Creates an element from a string (without appending it to the document). If the given string contain...
Invokes the provided function after wait milliseconds. Use setTimeout() to delay execution of fn. Us...
Chunks an array into smaller arrays of a specified size. Use Array.from() to create a new array, tha...
Returns a random integer in the specified range. Use Math.random() to generate a random number and m...
Returns the most frequent element in an array. Use Array.prototype.reduce() to map unique values to ...
Takes several functions as argument and returns a function that is the juxtaposition of those functi...
Converts a color code to a rgb() or rgba() string if alpha value is provided. Use bitwise right-shif...
Omits the key-value pairs corresponding to the given keys from an object. Use Object.keys(obj), Arra...
Returns true if the given number is a power of 2, false otherwise. Use the bitwise binary AND operat...
Parse an HTTP Cookie header string and return an object of all cookie name-value pairs. Use String.p...