For loops, JS

Hi. Could someone please tell me what I’m missing;

titles = ['The Philosopher\'s Stone', 'The Chamber of Secrets', 'The Prisoner of Azkaban', 'The Goblet of Fire', 'The Order of the Phoenix', 'The Half-Blood Prince', 'The Deathly Hallows'];
for(let i = 0; i < titles.length; i++){
  console.log(i+1, `${titles [i]}`);
}

Hint: Make sure that 1. The Philosopher's Stone is printed (i.e. without the quotes).

Hi,
It could be the full stop . between the number and title, or that the formatting is slightly off.
e.g.

console.log(`${i+1}. ${titles [i]}`);

Some of the lessons can be particularly fussy.
The logic looks sound.

Hope that helps

1 Like

Hi Pluginmaybe,

Thank you so much, it helped.

1 Like