0

Document.write(); in js showing an error in comodo editor page , can any one help me to know why is this happening ? please .

document.write (); error

13th Sep 2018, 3:39 PM
Mohammedkafhaji
Mohammedkafhaji - avatar
3 Answers
+ 1
If you run the same code in a different editor and it works, then you should contact support for the editor that gets the error. If you run the same code in a different editor and it still throws the same error, there is something wrong with the code, in which case, we would have to see the whole thing to properly diagnose, so you should share the full code (preferably in the Code Playground). The Code Playground should be relatively easy to find in the website version of SoloLearn, but if you are in the app version, it can be accessed via the curly braces, green circle with plus sign to add a new project, then select the project type. Looking forward.
13th Sep 2018, 5:38 PM
Janning⭐
Janning⭐ - avatar
0
okey , thanks , I will share the whole example function generateYears (start, end){ "use strict"; var years; document.write("<select>"); for(years = start ; years <=end; years++){ document.write("<option value =\"" + years + "\">" + years + "</option>"); } document.write("</select>"); } generateYears(1900, 2018);
13th Sep 2018, 9:24 PM
Mohammedkafhaji
Mohammedkafhaji - avatar
14th Sep 2018, 8:09 AM
Janning⭐
Janning⭐ - avatar