type coercion

by Berat Emre NebioÄźlu

JavaScript

var a = 42;
var b = a + "";			// implicit coercion
var c = String( a );	// explicit coercion

if(a == c){
	console..log("this part is interpreted"); // dont use ==
}
if(a === c){ // === impose "type safe" environment. Implicit type casting wont be done whatsoever.
	//this part will not be intepreted
}