30秒学会 JavaScript 片段 – Call functions with context
Given a key and a set of arguments, call them when given a context. Use a closure to call key with a...
Given a key and a set of arguments, call them when given a context. Use a closure to call key with a...
Creates a generator, that walks through all the keys of a given object. Use recursion. Define a gene...
String.prototype.includes() The most straightforward substring search option is String.prototype.inc...
I’ve often found myself needing to check if a given date is a weekday or weekend. As I’m...
Performs a deep comparison between two values to determine if they are equivalent. Check if the two ...
Finds the value of the last element in the given list that satisfies the provided testing function. ...
JavaScript provides two operators for typechecking: typeof is used to typecheck for primitive values...
Equality comparison Even though two different objects can have the same properties with equal values...
Cookies Cookies store small amounts of data that has to be sent back to the server with subsequent r...
Removes an element from an array if it’s included in the array, or pushes it to the array if i...