- Use
{}
instead ofnew Object()
- Use
""
instead ofnew String()
- Use
0
instead ofnew Number()
- Use
false
instead ofnew Boolean()
- Use
[]
instead ofnew Array()
- Use
/()/
instead ofnew RegExp()
- Use
function() {}
or() => {}
instead ofnew Function()
let x = "John";
let y = new String("John");
(x === y) // is false
unbind()
all event handlers before binding.