Why the color of the text isn't changing? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why the color of the text isn't changing?

https://code.sololearn.com/WKhLuOq8g5b4/?ref=app And yeah one more question.. Why 'w' of 'wow' I mean first character of the text is absent?

1st Apr 2021, 9:04 AM
Mohammad Mehedi Hasan
Mohammad Mehedi Hasan - avatar
7 Answers
+ 1
to change ur text color, get the element(u can use the body element) and use style.color property eg: document.body.style.color = "yellow"
1st Apr 2021, 9:24 AM
durian
durian - avatar
+ 2
You have to write bg color insted of style
1st Apr 2021, 9:10 AM
Pramesh
Pramesh - avatar
+ 1
prob what u want is if (x == txt.length) clearInterval(y); also, this wont get called actually.. try to put it inside the show function
1st Apr 2021, 9:22 AM
durian
durian - avatar
+ 1
i see the color changes now..so, yup..
1st Apr 2021, 9:30 AM
durian
durian - avatar
0
why u have two "x" variables?
1st Apr 2021, 9:11 AM
durian
durian - avatar
0
Pramesh does not bg color change background color?
1st Apr 2021, 9:22 AM
Mohammad Mehedi Hasan
Mohammad Mehedi Hasan - avatar
0
Lily I have changed my code.. is it ok now?
1st Apr 2021, 9:28 AM
Mohammad Mehedi Hasan
Mohammad Mehedi Hasan - avatar