While you could use Object.assign and shorthand properties:
constructor(number, point, beginning, A, B, C){
Object.assign(
this,
{
number,
grade,
beginning,
A,
B,
C,
}
);
}
Once you start to get a lot of parameters, it can be difficult for the caller to understand what's going on. Eg:
new Question(8, 5, 2, 's', 33, 9)
It may be quite unclear from the caller what all those properties refer to. You could pass a single object as a parameter instead, which both makes it clear from the caller's perspective which properties correspond to which value, and makes the constructor much more concise:
const q = new Question({
number: 8,
grade: 5,
// ...
});
constructor(props) {
Object.assign(this, props);
}
All that said, if your Question really doesn't have anything other than the constructor, I'd omit the class entirely and use a plain object literal; the class isn't providing any benefit.
const q = {
number: 8,
grade: 5,
// ...
};