How can I learn javascript?

  • Thread starter Thread starter Deleted member 995015
  • Start date Start date
D

Deleted member 995015

Guest
Hello!
I recently decided that I want to study some javascript. I've been watching some youtube videos lately. So I can understand the basics presented in the video but I really can't do anything by myself yet. I was wondering if there is any site that offers exercises or projects that should be done for beginners. I checked different textbooks on google but I wasn't quite sure which one to choose.

Do you have any suggestions about a site/textbook from which I can learn ???
I'll be really happy if you help me , I want to learn it and become good at it.
 
Udemy is your best friend try to find free courses for java on Udemy.
 
The way I learnt PHP and jQuery was by actively Googling to find bits and pieces of code that would help me solve a problem. I gradually started to figure out what this code did until I could eventually write scripts from scratch without using Google to help me.

Sure you probably won't become an expert using this method alone, but you'll learn the basics very quickly.

If you're up for it, here's some homework. I want you to figure out how to change the colour of all the yellow links on BHW to red, using Javascript.

And go.
 
Hi there,

Try lynda.com, the one place for learning all technologies. I hope it will help you to learn anything from scratch.
 
Go to a local college book store and purchase a used somewhat recent copy of intro to (language). Codeacademy.com is free and kinda cool as well. I really suggest you learn something lesson based and structured. Reason being, you will start off with basics then get into more advanced programming techniques likes inheritance, modularity, classes, constructors, etc. Those deal will other languages like C, java, etc.
 
freecodecamp.com my friend, this is a well structured tutorial that guides you pretty well
 
W3Resource has quite a few javascript exercises you can try for extra practice.
I also recommend the sololearn app along side other courses people have already mentioned, I wouldn't try to learn from the app alone though.

In my opinion, the best way to learn is by doing, breeze through the basics, it's fine if you don't fully understand them yet, and just find something you want to make, break it down into individual steps, and just search for information on how to do each step.

Simple Example:
I want to make a script that changes an image to the next of 5 possible images every 10 seconds.

The steps you come up with might be something like:
1) Store the 5 images
2) Display the first image
3) Wait 10 seconds, then display the next image
4) Repeat step 3 until the last image is displayed, then go back to step 2

After a bit of googling on how to complete these steps you might come up with something like
1) Create an array containing links to the 5 images
2) Set the src of an img element to the first entry in the array
3) Use the setInterval function to change to the next image every 10 seconds, use a variable to keep track of which image is being displayed
4) Add an if statement to the setInterval that sets the current image to the first one if it was previously the last image

After converting this to code you'll get something kinda like

html
HTML:
<img src="" id="image"/>

javascript
Code:
var images = ["image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg"];

document.getElementById("image").src = images[0];

var currentImage = 0;

setInterval(changeImage, 10000);

function changeImage(){
    currentImage++;
    if(currentImage >= images.length){
        currentImage = 0;
    }
    document.getElementById("image").src = images[currentImage];
}


Learning by doing is the approach I took and now I do it for a living.
If this helps, that'd be nice.

Also the biggest mistake I see programming newbies make is not asking for help when they're stuck.
If you ever get stuck, just ask someone, there are plenty of programmers out there that are more than willing to help, just do them a favor and try to be as clear about the problem as you can, it's better for everyone involved that way.
 
Last edited:
Udemy and LearnJS dot org are the best. I would prefer the latter because it has a really good interactive editor to type along.
 
first watching video in youtube, second if you have a question you can ask here in bhw.
 
I don't understand the question. Considering all the resources online about coding, this seems like a very odd question for the forum.
 
Udemy, Lynda, and w3schools are best sites for learning.And practice is the key.
 
If you don't want to pay any fee, best choice is youtube. There is lots of developers channel on youtube.
 
Back
Top