30秒学会 JavaScript 片段 – insertBefore
Inserts an HTML string before the start of the specified element. Use el.insertAdjacentHTML() with a...
Inserts an HTML string before the start of the specified element. Use el.insertAdjacentHTML() with a...
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...
Horizontally and vertically centers a child element within a parent element using flexbox. display: ...
Returns the unique elements in a given list. Create a set from the list to discard duplicated values...
Uncurries a function up to depth n. Return a variadic function. Use Array.prototype.reduce() on the ...
Creates a function that invokes fn with a given context, optionally adding any additional supplied p...
Converts Celsius to Fahrenheit. Follows the conversion formula F = 1.8C + 32.
Create a n-dimensional array with given value. Use recursion. Use Array.prototype.map() to generate ...
title: find_last tags: list,beginner Returns the value of the last element in the provided list that...
Initializes and fills an array with the specified values. Use Array(n) to create an array of the des...