Variables Variables allow us to give a piece of data a name, then reference that data by its name further along in our program. This way, we can reuse a piece of data without having to remember what its actual value was; all we have to do is remember a variable name. Variables are symbolic …
Continue reading JavaScript VariablesJavaScript
JavaScript Exception Handling In JavaScript, we can try catch construct to handle exceptions. Here are few examples for try, catch, finally and throws. try and catch We can add our block of code inside try. If any errors occur in the try block, the control will go to the catch block where …
Continue reading JavaScript error handling with try, catch, finallyMost web browsers support writing message to console using console.log() method. This helps in debugging the javascript code. Opening Javascript Console We can open the JavaScript console from the Developer tools(Dev tools in Safari). You can also invoke it using following shortcuts : Windows(IE, Chrome, Firefox) F12, then click Console tab Mac OS Safari …
Continue reading Using console.log() in JavaScript