Examples vs directions - express.js routes



In the Express.js tutorial, Codecademy keeps giving examples but then asking the student to complete a task in a different way. This is driving me nuts because I don’t have a model to follow and I also have no way of checking if I can complete the task using their example model. For example, in Routes lesson 10, this is the example:

const monsters = { '1': { name: 'cerberus', age: '4'  } };
// PUT /monsters/1?name=chimera&age=1
app.put('/monsters/:id', (req, res, next) => {
  const monsterUpdates = req.query;
  monsters[req.params.id] = monsterUpdates;

But then in the directions, it says to use updateElement helper function instead.

What is the answer according to the example?