₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,110 members, 8,420,403 topics. Date: Thursday, 04 June 2026 at 06:37 PM

Toggle theme

JAVA Script - Help!!! - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJAVA Script - Help!!! (1419 Views)

1 Reply (Go Down)

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:
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
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:
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
are you not working with HTML?
Re: JAVA Script - Help!!! by Deesquare01(op): 9:49am On Mar 23, 2018
Dmayor7:
Just use your web browsers to output the code is see how it runs
Thanks a lot... God bless.
Re: JAVA Script - Help!!! by Deesquare01(op): 9:50am On Mar 23, 2018
holuphisayor:
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
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:
are you not working with HTML?
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:
Yes... But I'm not writing the js inside <script></script> tag... I am running it inside a .js file.
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:
Thanks a lot bro... This answers almost everything I'm ignorant of. But how do I link it with my HTML?
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:
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.
THanks.
Re: JAVA Script - Help!!! by Deesquare01(op): 12:14pm On Mar 23, 2018
bjhaid:
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>
Thanks
Re: JAVA Script - Help!!! by Dmayor7(m): 6:23am On Mar 24, 2018
Deesquare01:
Thanks a lot... God bless.
Yea... You're welcome.
1 Reply

Software Developer Needed ( Python, C++, C#, Html, Css & Java Script )Java Script Programming Tutor NeededI Will Convert You Html Css And Java Script To Android234

Odunayo Ajayi A 14 Year Old Award Winning CoderHELP! Too Many Libraries And Modules!Create A Bot For M$n And Win $