386 private links
La différence entre les variables primitives (string, number, boolean) et les complexes (object)
WTF is the this keyword
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 1For 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 consoleA 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