Created
March 2, 2015 15:18
-
-
Save peebeebee/ddb5c4ed9676a16461d7 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/halise
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"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
log = function(arg) { | |
// console.log(arg); | |
// for(index in arg) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
// for(index = 0; index <= arg.length; index++) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
console.log(arg.propertyIsEnumerable('propVar')); | |
}; | |
arr = ['some', 'thing', 'else']; | |
arr[4] = 'different'; | |
arr.propVar = 'myvarval'; | |
arr.propObj = {'myobj': 'val'}; | |
arr.propFunc = function() { return 'myfuncval'; }; | |
log(arr); | |
obj = {0:'some', 1:'thing', 2:'else'}; | |
obj[4] = 'different'; | |
obj.propVar = 'myvarval'; | |
obj.propObj = {'myobj': 'val'}; | |
obj.propFunc = function() { return 'myfuncval'; }; | |
log(obj); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">log = function(arg) { | |
// console.log(arg); | |
// for(index in arg) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
// for(index = 0; index <= arg.length; index++) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
console.log(arg.propertyIsEnumerable('propVar')); | |
}; | |
arr = ['some', 'thing', 'else']; | |
arr[4] = 'different'; | |
arr.propVar = 'myvarval'; | |
arr.propObj = {'myobj': 'val'}; | |
arr.propFunc = function() { return 'myfuncval'; }; | |
log(arr); | |
obj = {0:'some', 1:'thing', 2:'else'}; | |
obj[4] = 'different'; | |
obj.propVar = 'myvarval'; | |
obj.propObj = {'myobj': 'val'}; | |
obj.propFunc = function() { return 'myfuncval'; }; | |
log(obj); | |
</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
log = function(arg) { | |
// console.log(arg); | |
// for(index in arg) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
// for(index = 0; index <= arg.length; index++) { | |
// console.log(index + ' - ' + arg[index]); | |
// } | |
console.log(arg.propertyIsEnumerable('propVar')); | |
}; | |
arr = ['some', 'thing', 'else']; | |
arr[4] = 'different'; | |
arr.propVar = 'myvarval'; | |
arr.propObj = {'myobj': 'val'}; | |
arr.propFunc = function() { return 'myfuncval'; }; | |
log(arr); | |
obj = {0:'some', 1:'thing', 2:'else'}; | |
obj[4] = 'different'; | |
obj.propVar = 'myvarval'; | |
obj.propObj = {'myobj': 'val'}; | |
obj.propFunc = function() { return 'myfuncval'; }; | |
log(obj); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment