Home > database >  Not able to iterate over Map objects in Firefox console: undefined
Not able to iterate over Map objects in Firefox console: undefined

Time:11-18

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. Screenshot of console that contains the code but no output.

CodePudding user response:

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.

  • Related