0

The code for this is not mine. I was just going over something and saw a + before the keyword this for the first time and was wondering what it does.

                +this.closest('li').getAttribute('data-index');
Ana kamilova
  • 11
  • 1
  • 3
  • Re edit: (Except in the most literal sense) the `+` isn't before `this`, it is before the entire rest of the expression: `this.closest('li').getAttribute('data-index')` – Quentin Sep 08 '21 at 08:54
  • @ZlatanOmerović — Answers are better posted as answers, not comments. – Quentin Sep 08 '21 at 09:03

0 Answers0