Essential JavaScript

Build-a-Bot Kata

You are working on a video game where the player creates robots to do their work.

Each robot has three properties:

  • size - bigger robots can handle bigger jobs
  • metal - the stronger the metal, the more durable the robot
  • job - each robot can perform tasks associated with its job

You need to write the code that creates robots.

Given a size, a type of metal, and a job, return a robot object that has those properties.

For example, a "large" "copper" "digger" robot object would look like this:

const largeCopperDigger = {
  size: 'large',
  metal: 'copper',
  job: 'digger',
};

Code Editor