Please help me find JS bug!!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Please help me find JS bug!!!

I am trying to make a a code generator. My problem is that I have an error. A button calls function, which promts for a input. The input is processed and the output is shown on a Textarea using GetElemtById. Please help me!! https://code.sololearn.com/W2qhGYKBYExo/?ref=app

2nd Aug 2020, 10:07 AM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
4 Answers
+ 9
func -> function // No such syntax in JS add function for image(), iframe(), youtube(), HH() I suppose the variable final is what you type in prompt part Hope this helpful! Programming is fun! ๐Ÿ˜„๐Ÿค— https://code.sololearn.com/WXI6ItqK6DRK/?ref=app
2nd Aug 2020, 10:18 AM
WenHao1223
WenHao1223 - avatar
+ 1
func must be function and variable final does not exist
2nd Aug 2020, 10:10 AM
Gabriel Ilie
Gabriel Ilie - avatar
+ 1
You have written `func link()` instead of `function link()` in the code. Also, on line 4, you have written an unknown variable name `final`, which should be `almost` (assigned on line 3)
2nd Aug 2020, 10:14 AM
XXX
XXX - avatar
+ 1
CodeWarrior ๐•ฎ๐–”๐–‰๐–Š๐–‚๐–†๐–—๐–—๐–Ž๐–”๐–— , first in JS part change func to function. There are some other functions in Html part you placed as events that are not defined in JS. Variable final doesn't exist, also you are using JQuery, but you don't get the link in Html to use it.
2nd Aug 2020, 10:19 AM
TheWhยกteCat ๐Ÿ‡ง๐Ÿ‡ฌ
TheWhยกteCat ๐Ÿ‡ง๐Ÿ‡ฌ - avatar