We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ad563f commit 7334d66Copy full SHA for 7334d66
docs/1-trial-session/11-object/index.mdx
@@ -34,6 +34,7 @@ JavaScript の<Term>オブジェクト</Term>は、ほかの言語でいう**辞
34
```javascript
35
const person = {
36
name: "田中",
37
+ age: 18,
38
scores: { math: 80, science: 90 },
39
};
40
```
@@ -43,8 +44,10 @@ const person = {
43
44
ドット記号を用いることで、<Term>オブジェクト</Term>の<Term>プロパティ</Term>を取得・変更できます。通常の<Term>変数</Term>のように扱えます。
45
46
-person.age += 1;
47
-document.write(person.age);
+document.write(person.age); // 18
48
+
49
+person.age = 19;
50
+document.write(person.age); // 19
51
52
53
:::tip[プロパティの追加]
0 commit comments