Entries from 2023-02-05 to 1 day
オブジェクトの末尾にconstアサーション「as const」をつけると、オブジェクトすべてのプロパティに「readonly」がついた状態になる。「as const」がついたオブジェクトのプロパティに、再代入はできない。 const foo = { nation: "India", sex: "male", nam…
オブジェクトの末尾にconstアサーション「as const」をつけると、オブジェクトすべてのプロパティに「readonly」がついた状態になる。「as const」がついたオブジェクトのプロパティに、再代入はできない。 const foo = { nation: "India", sex: "male", nam…