Oisris
10/9/2013 - 10:48 AM

javascript something

javascript something

<html>
<head>
	<title>== and ===</title>
	<script type="text/javascript">
		var x = 5;
		var y = "5";
		if(x == y){
			alert("x == y is true");
		} else{
			alert("x == y is false");
		}
		if(x === y){
			alert("x === y is true");
		} else{
			alert("x === y is false");
		}
	</script>
</head>
<body>
	<div></div>
</body>
</html>
<html>
<head>
	<title>Pratice</title>
	<script type="text/javascript">
		var x = 5;
		var y = ++x;
		var z = x++
		document.write("x = "+x+"<br />");
		document.write("y = "+y+"<br />");
		document.write("z = "+z+"<br />");
	</script>
</head>
<body>
	<div></div>
</body>
</html>