Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda