“Twilio Quest”挑战,任何帮助将不胜感激,我不知道我做错了什么,

问题描述

似乎无法掌握这个“Twilio Quest”挑战。

嘿,过去一周我一直在玩这个名为“Twilio Quest”的游戏。
我只是想学习 JavaScript,而且我觉得它看起来还不错。
所服务的挑战困难重重。但我一直设法绕过,直到现在。
一直在阅读:JavaScript.info - ClassesMDN - ClassesJavaScript.info - Object literal notationMDN - Object Initialization 我尝试了很多方法。但我似乎真的无法接受这个挑战。
任何帮助将非常感激。我只是想学习。提前致谢。
这是我想要做的:

class targetingSolution {
  constructor(config) {
    // your code here
  }

  // your code here
}

// The following lines of code are not required for the solution,but can be
// used by you to test your solution.
const m = new targetingSolution({
  x: 10,y: 15,z: 900
});

console.log(m.target()); // would print "(10,15,900)"

解决方法

class TargetingSolution {
  constructor(config) {
    this.value = `(${config.x},${config.y},${config.z})`
    this.target = () => this.value;
  }
}

let m = new TargetingSolution({
  x: 10,y: 15,z: 900
});

console.log(m.target());