Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,208,278 members, 8,002,135 topics. Date: Thursday, 14 November 2024 at 03:15 AM

JAVA Script - Help!!! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / JAVA Script - Help!!! (1295 Views)

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)

(1) (Reply) (Go Down)

JAVA Script - Help!!! by Deesquare01(m): 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

1 Like

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

2 Likes 1 Share

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?

1 Like

Re: JAVA Script - Help!!! by Deesquare01(m): 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.

1 Like

Re: JAVA Script - Help!!! by Deesquare01(m): 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(m): 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>

1 Like

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.

1 Like

Re: JAVA Script - Help!!! by Deesquare01(m): 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(m): 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 Like

(1) (Reply)

If Women Were Programing Languages,, (laugh Time) ;D / . / I Need An Investor To Finance My App.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.