Blog


09

May 2016

Common Mistakes in JavaScript

Use Of Assignment Operator If a programmer coincidentally uses an assignment operator (=), instead of a comparison operator (==) in an if statement, it will generate errors or unexpected results. OUTPUT :


09

May 2016

Use Strict in JavaScript

“use strict”, it defines that the javascript code should be executed in strict mode. Declaration of strict mode: we can declare strict mode by adding “use strict” to beggining of a js function. OUTPUT : With “use strict”: Using a variable without declaring it, is not allowed. Activate debugging in your browser (F12) to see the error report.


07

May 2016

Hoisting in JavaScript

It is a javascripts default behavior of mmoving to the top. In JavaScript we can used a variable before it has been declared. OUTPUT : 5


07

May 2016

Debugging in JavaScript

There is very difficulties to write JavaScript code without a debugger. Might your code contain syntax errors, or logical errors, that are difficult to diagnose. Searching errors on your code is called debugging. OUTPUT : First Web Page Activate debugging in your browser (Chrome, IE, Firefox) with F12, and select “Console” in the debugger menu.


07

May 2016

finally Statement in JavaScript

Finally block provides you benifits of executing your code after try and catch block. the codes on the finally block will execute always when try and catch executed or not. Syntax try { Block of code to try } catch(err) { Block of code to handle errors } finally { Block of code to be executed regardless of the try / catch result } OUTPUT...

Read More


07

May 2016

Error Handling in JavaScript

Try and Catch blocks are used to define errors in JavaScript and throw statement is used to handle this error. The try statement allows to define a block of code to be tested for errors while it is being executed. The catch statement allows to define a block of code to be executed, if an error occurs in the try block. Syntax try { Block...

Read More


07

May 2016

Errors In JavaScriprt

An error is a condition or a situation where a block of code which are in running state suddenly stop executing. When our JavaScript code is executing different type of error can occur. These can from a code(writtern by programmer), due to wrong input. OUTPUT :


06

May 2016

Regular Expressions in JavaScript

a sequence of characters that forms a search pattern is known as Regular expression. Syntax /pattern/modifiers; Example : http://localhost/programming/java. OUTPUT : Search a string for “crazyeducation”, and display the position of the match: Try it


05

May 2016

Conversion From String To Number

In JavaScript we use the Number() method to convert a string to number. OUTPUT : Click to see converted result See Result



Page 3 of 2812345...1020...Last »