Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling/ running Javascript in Notepad++ [beginner question]

I am a beginner programmer. I have a limited knowledge of javascript, but I have only worked in an IDE. I am currently following Lifehacker's programming series which teaches javascript. I have downloaded Notepad++ and have completed a program, but I am not sure of the steps to run it. In the video, the user is able to just send the program to a browser and the code runs from there.

Here is the video for reference: http://bit.ly/gUsMd3

Thanks! (note: i am a beginner to both programming and this site so any constructive criticism is welcome)

like image 800
MetroGnome Avatar asked Jan 27 '11 15:01

MetroGnome


2 Answers

Javascript does not need to be compiled, you can put it between <script> and </script> in a file, save it as something.html and open it in your browser.

Java needs to be compiled, but that is something completely different.

like image 51
Merijn Avatar answered Oct 04 '22 18:10

Merijn


Just save the sample code to a file, such as "example.html", and then open that file in a browser.

<html>
<script>
alert("hi");
</script>
</html>
like image 33
Anvesh_vs Avatar answered Oct 04 '22 18:10

Anvesh_vs