mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
525 B
525 B
title, tags, layout
| title | tags | layout | ||||
|---|---|---|---|---|---|---|
| How to create an empty map that does not have properties in JavaScript |
|
note |
In this Article we will go through how to create an empty map that does not have properties only using single line of code in JavaScript.
Let's define this short function:
The following map has __proto__ property
const map = Object.create(null);
The following map doesn't have any properties
const map = {};