---
title: "Comment by Ridwan Olanrewaju on \"JS Capsules: Maps\" | Hashnode"
description: "Excellent article. I should mention though, that an Object can have a number as a property key. For Example: const x = { 7 : &quot;tight&quot; } // undefined x["
url: "https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff/comment/62c53ad2d2e08c68f6e7a010"
---

[Discussion](https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff)

Comment [JS Capsules: Maps](https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff)

[Ridwan Olanrewaju](https://hashnode.com/@ibnlanre)

[Jul 6, 2022](https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff/comment/62c53ad2d2e08c68f6e7a010)

Excellent article. I should mention though, that an Object can have a `number` as a property key.

**For Example:**

```
const x = { 7: "tight" } // undefined
x[7] // 'tight'
```

[Fecharalua](https://hashnode.com/@Fecharalua)

[Jul 6, 2022](https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff/comment/62c53ad2d2e08c68f6e7a010#reply-62c576a57b0f3b700c5450b4)

If the key is of type Number, it will be converted to a String. So the value of x\['7'\] is also 'tight'.

[Divine Orji](https://hashnode.com/@dpkreativ)

[Jul 6, 2022](https://hashnode.com/posts/js-capsules-maps/62c20f4dccecfb25bbc769ff/comment/62c53ad2d2e08c68f6e7a010#reply-62c5a7b7c8efe473b8fe41a3)

[Fecharalua](https://hashnode.com/@Fecharalua)'s correct. JavaScript will convert an Object's key to a string.
