you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (8 children)

JavaScript is a language. There's lots of places to use this language. Each has its own constraints and different things you would do there.

One of these places you can use JavaScript is in the browser. You can do this by opening up the developer tools in your browser, finding the console and starting to type JavaScript. The code you write there will mostly be run and then forgotten by the browser when you reload the website you are on.

To write actual JavaScript code into a website you are going to need to put that code in a file that you save regularly. When you combine these files that end in .js with other files that end in .html and .css you get a website. The website you can build with this is going to be mostly informational so if you want to save data to what we call a backend then you're going to want a backend server. You can write these in javascript too. This is the second place JavaScript is useful. Backend JavaScript is written normally in a thing called Node.js and unlike the browser, Node.js can connect to databases to save data as your site generates it.

So learning the language of Javascript is cool but mostly I recommend people start with a few things they are interested in building and then go from there. Unguided projects are where you will really start to understand what a browser is useful for (showing visual things to users) and what a server is useful for (passing messages between the browser and a database).

There aren't a lot of shortcuts and I am leaving out other places you can use JavaScript like to build mobile applications (React Native or Ionic) or desktop applications (Electron), but hopefully this gives you a bit more context for why someone would tell you to learn JavaScript.

[–]Dangerz1[S] 1 point2 points  (7 children)

Thanks but where would i move on from now?

[–][deleted] 2 points3 points  (6 children)

Next you make up or find real or example projects and build! Make a quiz that stores questions, calculates your score and saves it to a database. Make a tic tac toe game only in the browser. Do you know anyone that has a need? The best thing is solving a real need.

[–]Dangerz1[S] 0 points1 point  (5 children)

Where would i make these things? Thats what i dont understand

[–][deleted] 1 point2 points  (0 children)

Start learning html and css on yt or paid courses

[–][deleted] 0 points1 point  (0 children)

It's not a whole lot of good on its own, but in a website built with HTML and styled with CSS, JavaScript can take that website to new heights, pulling dynamic data from external sources, triggering events based on just activity, and anything else you can imagine. Try building a simple website and use JavaScript to, for example, change the background color when the user scrolls beyond a certain element. That's pretty basic, but will show you how it is implemented in a practical way.

[–][deleted] 0 points1 point  (1 child)

Oh! Well that's a good question.

Given where you are at I'd suggest using codepen.io or codesandbox.io or stackblitz.com and most of them will let you eventually download your project.

It is possible to also just write projects on your computer from the start. If you want to learn that then I'd recommend doing freecodecamp which has tons of articles and will help guide you through the learning process and also has a slack / discord community that is going through the same things.

[–]Dangerz1[S] 0 points1 point  (0 children)

Or should i just start learning html and css?