Why aren't template literals green in the code playground in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Why aren't template literals green in the code playground in JavaScript?

//Try this code. var tl = `4+5=${4+5}`; //This is a template literal.It is a type of string so shouldn't it be green in the code playground document.write(tl);

10th Aug 2018, 6:44 PM
Shuaib Nuruddin
Shuaib Nuruddin - avatar
2 Answers
+ 6
that's actually a nice suggestion try submitting it to SL ^_^
10th Aug 2018, 6:55 PM
Burey
Burey - avatar
+ 5
Just request it; I found a bug in their editor keyword suggestions a while back and they had it fixed by the next update -- but this would have affected a lot of people. If it doesn't get changed...just note: I think template literals don't work on older javascript engines (making it a syntax / unexpected symbol error), so it may mean not enough mobiles support it.
11th Aug 2018, 1:38 AM
Kirk Schafer
Kirk Schafer - avatar