Answer:
class countUp {
constructor() {
for (let i = 1; i <= 10; ++i) {
console.log(i);
}
}
}
const count = new countUp();
Step-by-step explanation:
To solve the problem we create a class called countUp with the main method called constructor, inside constructor we have a for loop that iterates from one to ten increasing the variable i by one after each iteration, inside the for is a console function to print the numbers from one to ten one at a time. Note that for this program to work we need to instantiate the class countUp using the variable count.