Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Not able to iterate over Map objects in Firefox console: undefined

Still new to Javascript.

I tried iterating over a Map object and printing the keys/values in the console. However it just returns undefined, even if I use the example from the Mozilla firefox documentation. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

eg,

const myMap = new Map()
myMap.set(0, 'zero')
myMap.set(1, 'one')

for (const [key, value] of myMap) {
  console.log(key + ' = ' + value)
}

Does anybody know what might the problem here?

It seems to work on Chrome, but in Firefox console (Ubuntu VM) it only returns undefined.

Screenshot of console that contains the code but no output.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You have disabled showing logs. Above the console, to the right of the filter there are buttons for different levels of messages you can enable or disable: Errors, Warnings, Logs, Info, Debug. All of these are currently disabled (toggled off) - you can recognise it by the white background.

The Logs also shows (2) which means that there are two log messages that have been filtered out from display:

Screenshot of the console where the "Logs (2)" button is highlighted.

You need to click on Logs to enable viewing the log messages. The background would change if it is enabled.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!