Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion JavaScript/1-object.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,8 @@ class Dictionary{
return this.map[key];
}
has(key){
return !!this.map[key];
return Object.keys(this.map)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please consider to use key in this.map

.includes(key);
}
delete(key){
delete this.map[key];
Expand Down