Right way to declare a static Javascript map with String keys and String values

dictionary, javascript, static, string

Solution

Yes, that's the normal and correct way to initialize a Javascript object.

Problem

Is this the right way to declare a static Javascript map of String keys and String values? ``` var myMap = { "key 1" : "value 1", "key 2" : "value 2", ... "key n" : "value n" }; ``` REM: all keys and values will be html escaped for special characters, they may contain blank spaces.

Original source

Related problems