Help us understand the problem. What is going on with this article?

【JavaScript】JSのオブジェクトの書き方【初心者】

index.html
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <h1>object更新</h1>

  <script>

    // 定数を設定して配列を代入する
    const person = {
      id: 1,
      name: "suzuki",
      age: 29,
    };

    // 配列の中の名前をtanakaに変更する場合
    person.name = "tanaka";

    // 関数を定義して、コンソールに配列の中身をそれぞれ表示させる処理を書く。
    const write = () => {
      console.log(person.id);
      console.log(person.name);
      console.log(person.age);
    }
    // 実際に関数を実行
    write();

  </script>
</body>
</html>
qlpt2020
WEB制作受託会社でコーダーとして働いています。 Vue.js, JavaScriptを勉強したいと思っています。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした