Learn Basic JavaScript by Building a Role Playing Game - Step 153

This is what i was told to do " Use the += operator to add " Your <weapon> breaks." , with a space in front of Your , to the end of text.innerText . Replace <weapon> with the last item in the inventory array using inventory.pop() , which will remove the last item in the array AND return it so it appears in your string."

please am i doing anything wrong


  let lastItem = inventory.pop();
  text.innerText +=  " Your " + lastItem ;

### Your browser information:

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36</code>

### Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 153
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-javascript-by-building-a-role-playing-game/step-153

You could try doing this in one line, and I don’t see the end of the sentence there.

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Your code works, as you can see it logs the item popped, however, the tests being run are looking for your strings to match what it expects. Open the console window that’s provided and follow the test results. This will allow you to identify the issue.