Category: JavaScript Misc
-
JavaScript Hoisting
Hoisting is a mechanism in JavaScript that moves the declaration of variables and functions at the top. So, in JavaScript we can use variables and functions before declaring them. JavaScript hoisting is applicable only for declaration not initialization. It is required to initialize the variables and functions before using their values. JavaScript Hoisting Example Here,…
-
JavaScript Debugging
Sometimes a code may contain certain mistakes. Being a scripting language, JavaScript didn’t show any error message in a browser. But these mistakes can affect the output. The best practice to find out the error is to debug the code. The code can be debugged easily by using web browsers like Google Chrome, Mozilla Firebox.…
-
JavaScript this keyword
The this keyword is a reference variable that refers to the current object. Here, we will learn about this keyword with help of different examples. JavaScript this Keyword Example Let’s see a simple example of this keyword. Output: Javatpoint Noida UP The following ways can be used to know which object is referred by this…