<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Difference between == and === in JavaScript</title>
<script data-require="jquery" data-semver="3.0.0" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<script>
// alert(0 == false); // return true, because both are same type.
// alert(0 === false); // return false, because both are of a different type.
// alert(1 == "1"); // return true, automatic type conversion for value only.
// alert(1 === "1"); // return false, because both are of a different type.
// alert(null == undefined); // return true.
// alert(null === undefined); // return false.
// alert('0' == false); // return true.
// alert('0' === false); // return false.
// alert(1=== parseInt("1")); // return true.
console.log(0 == false); // return true, because both are same type.
console.log(0 === false); // return false, because both are of a different type.
console.log(1 == "1"); // return true, automatic type conversion for value only.
console.log(1 === "1"); // return false, because both are of a different type.
console.log(null == undefined); // return true.
console.log(null === undefined); // return false.
console.log('0' == false); // return true.
console.log('0' === false); // return false.
console.log(1 === parseInt("1")); // return true.
</script>
</head>
<body>
<h3>Difference between == and === in JavaScript</h3>
<a href="http://www.code-sample.com/" target="_blank">For more...</a>
</body>
</html>
// Add your javascript here
$(function(){
$("h1").animate({
"margin-left": "100px"
}, "slow");
});
/* Put your css in here */
h1 {
color: red;
}