Length Of A JavaScript Object

const my_object = {
  name :"#! code",
  domain: "www.hashbangcode.com"

const keys = Object.keys(my_object);

console.log(keys); // (2) ['name', 'domain']

console.log(keys.length); // 2


Add new comment

The content of this field is kept private and will not be shown publicly.
2 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.