JAVA Script - Help!!! - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › JAVA Script - Help!!! (1419 Views)
| JAVA Script - Help!!! by Deesquare01(op): 3:52pm On Mar 22, 2018 |
Good day Developers. Please how do I output Javascript in a text editor, saving the text with .js extension. Can I use console.log() in a text editor provided I saved the file with .js extension and not .html. Thanks |
| Re: JAVA Script - Help!!! by Dmayor7(m): 3:56pm On Mar 22, 2018 |
Deesquare01:Just use your web browsers to output the code is see how it runs |
| Re: JAVA Script - Help!!! by holuphisayor(m): 4:24pm On Mar 22, 2018 |
JavaScript runs in the browser and not text editor. open your browser, right- click and select "inspect element" click on the "console" tab and type your JavaScript codes there. shift+enter to move to a new line without executing or install node js |
| Re: JAVA Script - Help!!! by Nobody: 8:49am On Mar 23, 2018 |
Deesquare01:are you not working with HTML? |
| Re: JAVA Script - Help!!! by Deesquare01(op): 9:49am On Mar 23, 2018 |
Dmayor7:Thanks a lot... God bless. |
| Re: JAVA Script - Help!!! by Deesquare01(op): 9:50am On Mar 23, 2018 |
holuphisayor:Thanks a lot bro... This answers almost everything I'm ignorant of. But how do I link it with my HTML? |
| Re: JAVA Script - Help!!! by Deesquare01(op): 9:51am On Mar 23, 2018 |
bjhaid:Yes... But I'm not writing the js inside <script></script> tag... I am running it inside a .js file. |
| Re: JAVA Script - Help!!! by Nobody: 9:56am On Mar 23, 2018 |
Deesquare01:link it with your HTML , then open it on your browser , make sure the js file and HTML are in the same folder then put this before your body tag, <script src ="name of file.js"></script> |
| Re: JAVA Script - Help!!! by holuphisayor(m): 9:59am On Mar 23, 2018 |
Deesquare01:create a .html file create your .js file link your js file to the html using the <!DOCTYPE html> <html> <head> </head> <body> <script src="path/to/js-file"></script> </body> </html> you should console.log(result); your js code. load your .html in favourite browser and "inspect element" . view result in your console tab. |
| Re: JAVA Script - Help!!! by Deesquare01(op): 12:13pm On Mar 23, 2018 |
holuphisayor:THanks. |
| Re: JAVA Script - Help!!! by Deesquare01(op): 12:14pm On Mar 23, 2018 |
bjhaid:Thanks |
| Re: JAVA Script - Help!!! by Dmayor7(m): 6:23am On Mar 24, 2018 |
Deesquare01:Yea... You're welcome. |
Software Developer Needed ( Python, C++, C#, Html, Css & Java Script ) • Java Script Programming Tutor Needed • I Will Convert You Html Css And Java Script To Android • 2 • 3 • 4
Odunayo Ajayi A 14 Year Old Award Winning Coder • HELP! Too Many Libraries And Modules! • Create A Bot For M$n And Win $