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
4 changes: 2 additions & 2 deletions javascript/basics/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* All Javascript values except primitives(string, number, bigInt, boolean, null, undefined) are Objects like Arrays, Regular expressions, Functions, Dates, Maths etc.

* Even strings, numbers and booleans can be consisdered as Objects if they are defined with new keyword.
* Even strings, numbers and booleans can be considered as Objects if they are defined with new keyword.

* As discussed before, Object datatype represents complex entities which consists of key-value pairs. Objects can be created using curly brackets({ }) with an optional list of properties.

Expand Down Expand Up @@ -84,4 +84,4 @@ console.log(arr) ; // [ [ 'name', 'foo' ], [ 'id', 123 ] ]

The above example helps you to understand how you can convert objects to arrays. If you are using `Object.entries` then you need to destructure it like `const [name,id] of arr`.

Once the objects are converted to arrays, then you can use the normal iteration techniques for an array as discussed [here](https://onecompiler.com/posts/3vgf2g9ag/different-ways-of-iterating-over-an-array-in-javascript).
Once the objects are converted to arrays, then you can use the normal iteration techniques for an array as discussed [here](https://onecompiler.com/posts/3vgf2g9ag/different-ways-of-iterating-over-an-array-in-javascript).