We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25ac6d6 commit 504566aCopy full SHA for 504566a
objectOriented/accessors.js
@@ -14,4 +14,14 @@ var count = 0;
14
15
for (var i = 1; i< 100; i++) {
16
count += bar;
17
+}
18
+
19
20
21
22
+function listGuns(guns) {
23
+ for (var speargun in guns) {
24
+ console.log("Behold! " + speargun + ", with " +
25
+ guns[speargun]["heft"] + " heft!");
26
+ }
27
}
objectOriented/enumeration.js
@@ -0,0 +1,9 @@
1
+aquarium.countFish = function(){
2
+ var numFish = 0;
3
+ for ( key in aquarium ) {
4
+ if ( aquarium[key].type == "fish") {
5
+ numFish++;
6
7
8
+ return numFish;
9
+};
0 commit comments