Hi everyone! I'm the author of code.mu :)
I'd love to chat with my non-Russian audience. I'm looking for your feedback on the site and the translation quality. Let's chat:)
⊗jsPmObEOD 81 of 504 menu

Output of an entire object in JavaScript

The contents of an entire object cannot be viewed normally with the function alert:

let obj = {1: 'a', 2: 'b', 3: 'c'}; alert(obj); // shows [Object object]

To see the contents of the entire object, you need to print it to the console:

let obj = {1: 'a', 2: 'b', 3: 'c'}; console.log(obj); // shows the object itself

Create an object with keys from 1 to 12, containing month names as values. Print this object to the console.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline