30秒学会 JavaScript 片段 – merge
Creates a new object from the combination of two or more objects. Use Array.prototype.reduce() combi...
Creates a new object from the combination of two or more objects. Use Array.prototype.reduce() combi...
Add special characters to text to print in color in the console (combined with console.log()). Use t...
Removes zero values from a collection. Use reflect.ValueOf() to get the array or slice, make() to ma...
Returns a customized coalesce function that returns the first argument that returns true from the pr...
Evenly distributes child elements within a parent element. display: flex enables flexbox. justify-co...
Gives text a gradient color. background: -webkit-linear-gradient(…) gives the text element a gradi...
Creates an array of key-value pair arrays from an object or other iterable (object, array, string, s...
Returns all indexes of a given element in the collection, or [-1] if it is not present. Use reflect....
Capitalizes the first letter of a string. Capitalize the first letter of the string and then add it ...
Creates a function that invokes fn with partials appended to the arguments it receives. Use the spre...