Javascript Type Conversion

Javascript Type Conversion 

Type Conversion is automatically carried out in javascript.  Normally automatic conversion happen normally in relational operators.

Type conversion is the act of converting data of one type into a different type  .  It occurs automatically in javaScript when you change the type of data stored in a variable.

var  a=”3.56”;

a= 3.56;

Type of  a changes from string to number. Besides the automatic conversion inherent in a javaScript . We can also convert one data type to another data type using different method.

toString(), parseInt();

Example of Javascript Type Conversion :- 


document.write(parseFloat(“7.8888″) +”<br>”);


Result of Javascript Type Conversion :-



Follow Us

Contact Us

Back to Top