Given the requirement to refactor the code above to JavaScript class ...

Given the requirement to refactor the code above to JavaScript class ...