September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,15 +0,0 @@
|
|||
var myhash = {}; // a new, empty object
|
||||
myhash["hello"] = 3;
|
||||
myhash.world = 6; // obj.name is equivalent to obj["name"] for certain values of name
|
||||
myhash["!"] = 9;
|
||||
|
||||
var output = '', // initialise as string
|
||||
key;
|
||||
for (key in myhash) {
|
||||
if (myhash.hasOwnProperty(key)) {
|
||||
output += "key is: " + key;
|
||||
output += " => ";
|
||||
output += "value is: " + myhash[key]; // cannot use myhash.key, that would be myhash["key"]
|
||||
output += "\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
var myhash = {}; // a new, empty object
|
||||
myhash["hello"] = 3;
|
||||
myhash.world = 6; // obj.name is equivalent to obj["name"] for certain values of name
|
||||
myhash["!"] = 9;
|
||||
|
||||
var output = '', // initialise as string
|
||||
val;
|
||||
for (val in myhash) {
|
||||
if (myhash.hasOwnProperty(val)) {
|
||||
output += "myhash['" + val + "'] is: " + myhash[val];
|
||||
output += "\n";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue