Loading static/js/exercises.api.mjs +3 −2 Changes for static/js/exercises.api.mjs: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -18,8 +18,9 @@ class Exercise { #execute = null #context = new ExerciseExecutionContext() constructor(name, execute) { 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. Loading Loading @@ -231,7 +232,7 @@ export function test(name, exerciseCreationFunction) { * Note: This must be a function declared with the function keyword, arrow functions (()=>{...}) do not work. */ exercise(name, execute) { const exerciseObj = new Exercise(name, execute) const exerciseObj = new Exercise(name, this.exercises.length, execute) this.exercises.push(exerciseObj) } } Loading Loading
static/js/exercises.api.mjs +3 −2 Changes for static/js/exercises.api.mjs: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -18,8 +18,9 @@ class Exercise { #execute = null #context = new ExerciseExecutionContext() constructor(name, execute) { 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. Loading Loading @@ -231,7 +232,7 @@ export function test(name, exerciseCreationFunction) { * Note: This must be a function declared with the function keyword, arrow functions (()=>{...}) do not work. */ exercise(name, execute) { const exerciseObj = new Exercise(name, execute) const exerciseObj = new Exercise(name, this.exercises.length, execute) this.exercises.push(exerciseObj) } } Loading