Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda