30秒学会 JavaScript 片段 – union
Returns every element that exists in any of the two arrays once. Create a Set with all values of a a...
Returns every element that exists in any of the two arrays once. Create a Set with all values of a a...
Checks if the provided string is a valid JSON. Use JSON.parse() and a try… catch block to check if...
Returns the target value in a nested JSON object, based on the given key. Use the in operator to che...
Returns a string with whitespaces compacted. Use Regex.Replace() with a regular expression to replac...
Returns true if all the elements in values are included in itr, false otherwise. Use Iterable.every(...
Vertically and horizontally centers a child element within its parent element using display: table (...
Performs left-to-right function composition. Use Array.prototype.reduce() to perform left-to-right f...
Escapes a string to use in a regular expression. Use String.prototype.replace() to escape special ch...
Pads a string on both sides with the specified character, if it’s shorter than the specified l...
Returns true if at least one element in the collection passes the test implemented by the provided f...