超基本的なデータ構造
code:node.js
let myString = "string"
code:node.js
let myNumber = 0
code:node.js
code:node.js
# nodejsにおいてはobjectを使うべき
code:node.js
let myObject = {
"myObjectString": myString,
"myObjectNumber": myNumber,
"myObjectFunction": () => { return this.myObjectString }
}
myObject.myObjectString // => string
myObject.myObjectNumber // => 0
myObject.myObjectFunction() // => string
Javascript (nodejs) においてMashとObjectって何が違うの
ObjectはMapの下位互換