Fix on Classes introduction

On lines 82 and 86 the method’s name is missing

Car.prototype.startEngine = function () {
  this.engineRunning = true;
};

Car.prototype.addGas = function (litre) {
  // ...
};

It should be:


Car.prototype.startEngine = function startEngine() {
  this.engineRunning = true;
};

Car.prototype.addGas = function addGas(litre) {

I’ve created a PR that fixes this on Update introduction.md by Ricardo-MaGuz · Pull Request #2392 · exercism/javascript · GitHub

Unless I’m missing something, is the name not is defined on the LHS?

Car.prototype.startEngine = function () {

Well I tried it that way on the coding exercise but it didn’t work out. After adding the name onthe inner function it worked. Maybe it’s a bug on the editor then.

Do you have an example of where your code doesn’t work?

I’ve tried again in the IDE removing the function name declaration and worked. something weird must’ve happened. I’ll close the PR. Thanks Jeremy