ES6 - Write Concise Declarative Functions with ES6

Tell us what’s happening:
Lost on this one as well

Your code so far

// Only change code below this line
const bicycle = {
  gear: 48,
  setGear() {
    return `New Gear = ${this.gear} `;
  }
};
// Only change code above this line
bicycle.setGear(3);
console.log(bicycle.gear);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge: ES6 - Write Concise Declarative Functions with ES6

Link to the challenge:

The method should have a parameter that sets the new value as it is done in the starting code.

All you have to do is to remove the : function part of the initial code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.