30秒学会 JavaScript 片段
30秒学会 JavaScript 片段 – isDivisible
Checks if the first numeric argument is divisible by the second one. 检查第一个数值参数是否可以被第二个整除。 Use the mo...
30秒学会 JavaScript 片段 – dayOfYear
Gets the day of the year from a Date object. Use new Date() and Date.prototype.getFullYear() to get ...
30秒学会 JavaScript 片段 – isNegativeZero
Checks if the given value is equal to negative zero (-0). Checks whether a passed value is equal to ...
30秒学会 JavaScript 片段 – partition
Groups the elements into two arrays, depending on the provided function’s truthiness for each ...
30秒学会 JavaScript 片段 – untildify
Converts a tilde path to an absolute path. Use String.prototype.replace() with a regular expression ...
30秒学会 JavaScript 片段 – rearg
Creates a function that invokes the provided function with its arguments arranged according to the s...
30秒学会 JavaScript 片段 – curry
Curries a function. Use recursion. If the number of provided arguments (args) is sufficient, call th...
30秒学会 JavaScript 片段 – approximatelyEqual
Checks if two numbers are approximately equal to each other. Use Math.abs() to compare the absolute ...
30秒学会 JavaScript 片段 – findLast
Returns the last element for which the provided function returns a truthy value. Use Array.prototype...