Object destructuring and default arguments:
A default value to the default object:
Function composition is a mathematical operation that combines two or more functions in such a way that the output of one function becomes the input for the next function. The result is a new function that combines the behavior of both functions.
The corresponding execution order is from left to right. If you want to execute from right to left, then you can use the Array.prototype.reduceRight method.
I found an interesting function while working on my latest project. I call it a memoization function.
The function stores the results in memory and returns immediately if called repeatedly with the same arguments. Such a function is suitable for some longer and demanding calculations.
That is nothing new, but it's a nice piece of code. ;)
Look at this:
The API exposes 2 objects - FontFace and FontFaceSet. A FontFace represents a font. After loaded it, the font can be added to the list of available fonts (called FontFaceSet), and then can be used normally.
Yes, you can use the RegularExpression of cource. But, there is cool idea, how to extract tagged content in browser: