Home > JavaScript Questions > Does JavaScript support automatic type conversion?
Example:
Example:
console.log( 2 + '2' ); // 22
2-Explicit Type(We can convert datatype using javascript in built function)
var str = '180px';
var num = parseInt(str);
console.log( num ); // 180