+ 2

Why won't anything get evaluated?

I tried to make a tag that would evaluate every operation inside of it, using the inner HTML and the eval function in JavaScript, but nothing was being evaluated. Can someone help me, please? https://code.sololearn.com/WozOcnic3uFe/?ref=app

24th Jul 2020, 12:44 PM
PresidentOfYes12
PresidentOfYes12 - avatar
3 Antworten
+ 5
The getElementsByTagName function returns an array. So use evaler[0].innerHtml
24th Jul 2020, 12:47 PM
MSN
MSN - avatar
+ 3
NUHEEN Thank you; that was a surprisingly quick and easy fix!
24th Jul 2020, 12:48 PM
PresidentOfYes12
PresidentOfYes12 - avatar
+ 2
PresidentOfYes12 your welcome! Happy to help. 😊😊
24th Jul 2020, 12:49 PM
MSN
MSN - avatar