Created
August 8, 2018 23:03
-
-
Save krfong916/6d7f99d5e10967c4f80d6243879a1d35 to your computer and use it in GitHub Desktop.
// source http://jsbin.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"> | |
// Demonstrates why we should not use typeof === 'object' | |
var bar = []; | |
var test = (/[^abc]+/g); | |
var thump = null | |
console.log(typeof bar === 'object'); | |
console.log(typeof test === 'object'); | |
console.log(typeof thump === 'object'); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// Demonstrates why we should not use typeof === 'object' | |
var bar = []; | |
var test = (/[^abc]+/g); | |
var thump = null | |
console.log(typeof bar === 'object'); | |
console.log(typeof test === 'object'); | |
console.log(typeof thump === 'object');</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstrates why we should not use typeof === 'object' | |
var bar = []; | |
var test = (/[^abc]+/g); | |
var thump = null | |
console.log(typeof bar === 'object'); | |
console.log(typeof test === 'object'); | |
console.log(typeof thump === 'object'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment