Loading static/js/exercises.api.mjs +7 −6 Original line number Diff line number Diff line Loading @@ -28,17 +28,18 @@ export class Exercise { constructor(name, index, execute) { this.name = name this.index = index // Bind the execute function to the ExerciseExecutionContext. // This means that the `this` keyword, when used in the function, will // point to this ExerciseExecutionContext object. this.#execute = execute.bind(this.#context) this.#execute = execute } /** * Start the exercise. */ start() { this.#execute() // Bind the execute function to the ExerciseExecutionContext. // This means that the `this` keyword, when used in the function, will // point to this ExerciseExecutionContext object. // The newly bound function is then called. this.#execute.bind(this.#context)() } /** Loading Loading
static/js/exercises.api.mjs +7 −6 Original line number Diff line number Diff line Loading @@ -28,17 +28,18 @@ export class Exercise { constructor(name, index, execute) { this.name = name this.index = index // Bind the execute function to the ExerciseExecutionContext. // This means that the `this` keyword, when used in the function, will // point to this ExerciseExecutionContext object. this.#execute = execute.bind(this.#context) this.#execute = execute } /** * Start the exercise. */ start() { this.#execute() // Bind the execute function to the ExerciseExecutionContext. // This means that the `this` keyword, when used in the function, will // point to this ExerciseExecutionContext object. // The newly bound function is then called. this.#execute.bind(this.#context)() } /** Loading