30秒学会 JavaScript 片段 – isNil
Returns true if the specified value is null or undefined, false otherwise. Use the strict equality o...
Returns true if the specified value is null or undefined, false otherwise. Use the strict equality o...
Given a predicate function and a prop string, this curried function will then take an object to insp...
Returns true if the given number is odd, false otherwise. Checks whether a number is odd or even usi...
Checks a flat list for duplicate values, returning true if duplicate values exists and false if valu...
Returns true if the browser tab of the page is focused, false otherwise. Use the Document.hidden pro...
Measures the time taken by a function to execute. Use console.time() and console.timeEnd() to measur...
Checks if the provided integer is a prime number. Check numbers from 2 to the square root of the giv...
Returns the length of a string in bytes. Use s.encode(‘utf-8’) to encode the given string and return...
Removes falsy values from an array. Use Array.prototype.filter() to filter out falsy values (false, ...
Returns every element that exists in any of the two arrays once. Create a Set with all values of a a...