В курсе JavaScript в уроке: Вызов функции — выражение #792
Closed
oksanashmeleva1984
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Мне кажется есть ошибка
const name = 'JavaScript';
// Индексы начинаются с нуля
// Вызов метода и вычитание вместе!
const lastIndex = length(name) - 1;
console.log(lastIndex); // 9
Если индексы начинаются с нуля, то итоговый ответ разве не 8 будет?
Beta Was this translation helpful? Give feedback.
All reactions