30秒学会 JavaScript 片段 – scrollToTop
Smooth-scrolls to the top of the page. Get distance from top using document.documentElement.scrollTo...
Smooth-scrolls to the top of the page. Get distance from top using document.documentElement.scrollTo...
Performs right-to-left function composition. Use Array.prototype.reduce() to perform right-to-left f...
Initializes a list containing the numbers in the specified range where start and end are inclusive w...
Returns a a list of n random integers in the specified range. Use List.generate() to generate a list...
Replaces the names of multiple object keys with the values provided. Use Object.keys() in combinatio...
Navigate with matrix params: the router will navigate to /first;name=foo/details <a [routerLink]=...
Has the same functionality as Array.prototype.splice(), but returning a new array instead of mutatin...
Computes the new ratings between two or more opponents using the Elo rating system. It takes an arra...
Rounds a number to a specified amount of digits. Use Math.round() and template literals to round the...
Filters out the elements of an array, that have one of the specified values. Use array_values() and ...