Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Class Attributes | Classes & Objects
Object-Oriented Programming in JavaScript
セクション 1.  2
single

single

bookClass Attributes

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

Attributes are some variables inside the class that describe each object. Let’s demonstrate it with two classes – Rectangle and Student.

We can represent Rectangle by its height and width. Add these Attributes to the class definition:

1234
class Rectangle{ height; width; }
copy

If you need to describe student in some way, you can create class Student with attributes like, for example, name and university.

1234
class Student{ name; university; }
copy
タスク

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

Add more attributes to the class Student: age and gpa variables.

解答

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

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

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

セクション 1.  2
single

single

AIに質問する

expand

AIに質問する

ChatGPT

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

some-alt