255 private links
Setting the property name into brackets give the ability to evaluate its value as an expression. Thus custom property names can be created:
let a = {
['foo' + 1]: i,
}
console.log(a.foo1) // print 1
For the old Clippy 🤣
Using the object EventSource
from the client side in javascript ! So it allows to stream updates from a server.
Looks cool :)
Whaoouuhh 🌌
Wow there is great explanations on Generators in javascript here !
if you pass a undefined to a default parameter, the parameter will still be the default value.
i.e.
function sayHello(text = 'World') {
console.log(`Hello ${text}!`)
}
sayHello(undefined) // print "Hello World!" in the console
A good explanation on all of them. They are required now to write an even cleaner code.
Now it gets nice and clean ❤️
window.navigator.languages[0]
gets the first language (locale) preferred by the browser; works well with toLocaleDateString
😀
Such as : aRandomDate.toLocaleDateString(window.navigator.languages[0])
A list of issues encountered when CDNs are used
Extract the text from the images