Using Javascript in my pc


#1

How can i download the programming language Javascript in my computer so that i can code on my own?
Plz help anyone if u guys know anything


#2

well...you can just download notepad++and start programing...javascript is ok with all the internet explorer (google chrome firefox ect) all you need is an web page or an application


#3

but how to use notepad++?
I installed it and then typed some basic codes and then saved it as .html file.
When i tried opening it, it opened as a normal txt file.
Plz help


#4

did you save it as html? with the html extention or did uyou name it "document.html"?
you can choose the language using notepad++ then when you'll save your file it will be save as a fiel of the language you selected before


#5

.html is for html you need to type your javascript code betwen or include it with


#6

    <!DOCTYPE html>
        <html>
             <head>
                 <script>Here goes your code</script>
             </head>
        <body>
        </body>
    </html>

Now save it as name.html and if necessary choose open with INPUT FAVORITE BROWSER. Or use

    <!DOCTYPE html>
        <html>
             <head>
                 <script src="myJsFile.js"></script>
             </head>
        <body>
        </body>
    </html>

Then you just need to write your javaScript code in myJsFile.js and save it in the same folder. Also keep in mind that console.log prints to the web console not to the page so either get some further HTML and CSS knowledge or figure out where to find the web console.


#7

okkz thanks dude. am tryin it out now


#8

Yeah Thanks a lot. It worked. :smile:
But can u please tell me where can i learn the format which u wrote here?
I want to know how to write this language.


#9

There should be an FAQ or Guidelines post dealing with it but sure. There are some ways to get that code formatting. You could start the current line with 4 spaces (leave a blank line before and after it e.g.)

test

For inline code you could also use backtiks:

line of test `code`

Also for more then one line you can use the </> button and CTRL+k just mark your code and use one of them. And another cool feature is the triple backtiks surrounding your code because it highlights the syntax in color:

 Here goes your code ```code```

which might look like this:

var name = function(){
    for(var i=0;i<100;i++){
      console.log("just a test"); //just a comment
    }
};

The backtiks are on the line before and after the code.
Or do you mean the html?
https://www.codecademy.com/learn/web
Also you can press
CTRL+U on a smaller page to see it's source code where most of this is applied. Bigger sides often link a lot of stuff that might be too overwhelming.


#11

yup i got it. actually i dont know html so i didnt understand the format or the language which u used to get the code running.


#12

Oh, ok yes that is Hyper Text Markup Language or short html. You should really have a look at it is easy to learn as it is just a markup language and its what all websites are written in. It's kind of like the skeleton of a page, css gives some skin and js provides you with functionality.


#13

Sure thing, i will after I finish up learing JS. Thanks a lot for your help :smile:


#14

You are going to want to download Notepad++ and save your code as executable .bat files, or right click in google chrome and select "Inspect Element" which opens up an editable javascript/html interface you can play around with.


#15

Here is the down. link https://notepad-plus-plus.org/


#16

Thanks man, will surely try it out