30秒学会 JavaScript 片段 – stringPermutations
Generates all permutations of a string (contains duplicates). ⚠️ WARNING: This function’s exec...
Generates all permutations of a string (contains duplicates). ⚠️ WARNING: This function’s exec...
Returns the maximum of the given dates. Use the ES6 spread syntax with Math.max to find the maximum ...
Checks if the given argument is a string. Only works for string primitives. Use typeof to check if a...
Returns true if the given string is a palindrome, false otherwise. Convert the string to String.prot...
Iterates over all own properties of an object, running a callback for each one. Use Object.keys(obj)...
Returns true if the user color scheme preference is dark, false otherwise. Use window.matchMedia() w...
Checks if the predicate (second argument) is truthy on all elements of a collection (first argument)...
Converts a number to a decimal mark formatted string. Use Number.prototype.toLocaleString() to conve...
Deep freezes an object. Use Object.keys() to get all the properties of the passed object, Array.prot...
Clones a regular expression. Use new RegExp(), RegExp.source and RegExp.flags to clone the given reg...