Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Symbols 3/3 | Data Types and Variables
Introduction to JavaScript (staging)
セクション 3.  29
single

single

bookSymbols 3/3

メニューを表示するにはスワイプしてください

Accessing the Description of the Symbol()

We can access the description of the symbol by calling the .description method.

12
let firstName = Symbol('Michael'); console.log(firstName.description);
copy
タスク

スワイプしてコーディングを開始

Create two symbols personName and personAdress by using Symbol() give them the description of Name and Address and display their descriptions.

解答

Summary

  • Symbol is a primitive data type that is used to create a unique identifier.
  • We use the global Symbol() function to create symbols.
  • We can provide a description to a Symbol() function as an optional argument.
  • The description of the symbol can be accessed through the .description property.

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  29
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt