+1

Why is 'Hello2' not turning red?

https://code.sololearn.com/WrjZNSMj5Rpc/?ref=app

3/27/2019 4:13:18 AM

Piyush Kumar

1 Answer

New Answer

+3

because your first condition IF is met with "js" if you put "jss" it will turn the first div red since it no longer meets "js" condition. BUT in your else statement it will make hello red NOT hello2 because your else statement isnt calling div [1] (hello2)..its still calling div [0] ( hello) so as a hint..find a way to make the else statement make it red while calling the second div not the first.