javascript dictionary values code example
Example 1: dictionary in javascript
let myDictionary = {
"value 1": "string",
"value 2": 2,
"value 3": ["array value 1", "array value 2"]
};
var value1 = myDictionary["value1"];
var value2 = myDictionary["value2"];
var value3 = myDictionary["value3"];
Example 2: javascript get dictionary values
const object1 = {
a: 'somestring',
b: 42,
c: false
};
console.log(Object.values(object1));
Example 3: js dictionary
var dict = {
FirstName: "Chris",
"one": 1,
1: "some value"
};