Skip to content

Instantly share code, notes, and snippets.

@ohtangza
Created October 21, 2017 03:58
Show Gist options
  • Save ohtangza/44586680d2d86b934075f295961ec5bc to your computer and use it in GitHub Desktop.
Save ohtangza/44586680d2d86b934075f295961ec5bc to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/puvuqol
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
console.log('Expected to be true');
console.log(undefined == null); // true
console.log(null == null);
console.log('Expected to be false');
console.log({} == null);
console.log(0 == null);
console.log('null' == null);
console.log('undefined' == null);
</script>
<script id="jsbin-source-javascript" type="text/javascript">console.log('Expected to be true');
console.log(undefined == null); // true
console.log(null == null);
console.log('Expected to be false');
console.log({} == null);
console.log(0 == null);
console.log('null' == null);
console.log('undefined' == null);</script></body>
</html>
console.log('Expected to be true');
console.log(undefined == null); // true
console.log(null == null);
console.log('Expected to be false');
console.log({} == null);
console.log(0 == null);
console.log('null' == null);
console.log('undefined' == null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment