JavaScript an object-oriented computer programming language commonly used to create interactive effects within web browsers. The basics of JavaScript are given in this ppt.
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Practices of JavaScript.pptx
1.
2. BikalpaThapa
Practices of JavaScript
www.slideshare.net/AlkThp
Avoid Global Variables
Minimize the use of global variables.
This include all data types, objects, and functions.
Global variables and functions can be overwritten by other scripts.
Declare local variables with let and const.
4. BikalpaThapa
Practices of JavaScript
www.slideshare.net/AlkThp
Don’t use new object ()
Use “ ” instead of String()
Use O instead of new Number()
Use false instead of new Boolean()
Use { } instead of new object()
Use [ ] instead of new Array()
Use /()/ instead of new RegExp()
Use function () { } instead of new Function()