約97件1ページ目

日本語のみで絞り込む

6日前 -The constructor method may have a return value. While the base class may return anything from its constructor, the derived class must return an ...

2010/7/28 -Basically if your constructor returns a primitive value, such as a string, number, boolean, null or undefined, (or you don't return anything ...

2020/7/24 -So, if your constructor function returns an Object, that object is the result of the constructor. Otherwise, the return value is ignorerd, and ...

2013/9/5 -Ben Nadel demonstrates that an explicit return value in a JavaScript constructor can significantly change the reference returned to the ...

2021/6/12 -Any valid return value, valid being only object values. The this object if there is no return statement executed with a valid value. Let's look ...

2021/11/5 -The return value is the object constructed by the construction function. By using a return statement, you're just returning this.data instead of ...

By calling the super() method in the constructor method, we call the parent's constructor method and get access to the parent's properties and methods.

2024/7/11 -A class constructor is a special method within a class that initializes objects. Example of a Class Constructor. Here's the same Car example ...

2026/8/3 -A constructor with default values allows you to specify default values for properties if no values are provided during object creation. This ...

2025/10/24 -Discover when returning a value from a JavaScript constructor actually makes sense — and how it can produce self-constructing functions and ...