A static method belongs to the class, not to instances.
Acceptance criteria
- 1.#out should show 10.
A static method belongs to the class, not to instances.
class MathHelper { static double(n) { return n * 2; } } const helper = new MathHelper(); let result; try { result = String(helper.double(5)); } catch (error) { result = "not available on an instance"; } document.querySelector('#out').textContent = result;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.