We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f05375c commit 54da31aCopy full SHA for 54da31a
chapter06/01-Set.js
@@ -50,7 +50,8 @@ function Set() {
50
this.sizeLegacy = function(){
51
var count = 0;
52
for(var prop in items) {
53
- ++count;
+ if(items.hasOwnProperty(prop))
54
+ ++count;
55
}
56
return count;
57
};
chapter07/01-Dictionaries.js
@@ -15,7 +15,8 @@ function Dictionary(){
15
16
17
this.has = function(key){
18
- return key in items;
+ return items.hasOwnProperty(value);
19
+ //return value in items;
20
21
22
this.get = function(key) {
0 commit comments