Не могу написать код... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Не могу написать код...

Я хочу создать веб программу, которая через 1 секунду после загрузки страницы меняла содержимое заголовка h1 с 3 на 2, ещё через секунду на 1, ещё через секунду на 'Старт!' Но у меня не получается. Помогите пожалуйста!!!

3rd Sep 2019, 5:33 PM
Anonymous Hacker
Anonymous Hacker - avatar
1 Answer
+ 4
the syntax is setTimeout(function, time); and you are using anonymous function, so after the statement in anonymous function, the next line should be }, 1000); (i) } is closing the function (ii) , is separating the two arguments (iii) 1000 is the second argument. (iv) ; is to end the statement. https://code.sololearn.com/WHAvxuI0feoo/?ref=app
4th Sep 2019, 6:18 AM
Gordon
Gordon - avatar