Home »
MCQs »
ReactJS MCQs
In ES6 – The class properties are assigned inside a _____ method
17. In ES6 – The class properties are assigned inside a _____ method.
- props()
- properties()
- constructor()
- react-properties()
Answer: C) constructor()
Explanation:
In ES6 – The class properties are assigned inside a constructor() method.
class Laptop{
constructor(name) {
this.model = name;
}
}