- Generating Alerts
- Printing in Console
var a= 5; alert(a); alert("Hello world !!");
When you load you page you will get alert like this:
Note : After you testing complete you have to remove these alert statment otherwise duw to lots of alerts, end user will frustrate and that would be bad experience to user.
Printing in Console
For printing console logs help to analyse the execution of statement and values so that how flow got executed.
console.log(statement or text or variable);
console.log("Hello World !");
For checking debug logs of your page: Press Cntr + F12 function key to you open browser screen then go to console as in below screen.