Hey all, in this asynchronous JavaScript tutorial, I’ll be showing you how we can make http / ajax requests using vanilla javascript, as well as using the $.get() method in jquery.

+ Repo –
+ Brackets editor –

You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage…


========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

For more front-end development tutorials & to black-belt your coding skills, head over to – or

================== Social Links ==================

Twitter – @TheNetNinja –


  1. Great tutorials you share, Shaun, I love how you build it up so anyone should be able to follow. Thanks for the work!!

    I have some notes on this tutorial, for what it's worth…
    1. The description seems to have some errors. I couldn't find a repository, so I just typed as you went, and the editor you link to isn't the one you actually use here.
    2. Following the examples my console.log showed an error "XML Parsing Error: not well-formed
    Location: file:///D:/Hans/Downloads/The%20Net%20Ninja%20(Web%20Dev%20Tutorials)/Asynchronous%20Javascript%20Tutorial/bestanden/data/tweets.json
    Line Number 1, Column 1:"
    3. The jQuery method didn't work at all and just showed the xml error like above.
    instead of using $.get() it only worked when I changed it to $.getJSON(data/async.

    Just letting you know. Thanks for the great work!!

  2. Man, that is a very good explanation, the best i had seen, and it includes as jQuery as default javascript methods.

    I love it, thank you 😀

  3. I'm following your tutorials bro , your the best haha . can you make some tutorials about php & laravel . thanks a lot …

  4. Dude.. you running a university here lol. Best tutorials I have ever come across … I am using to learn new skills so I can build my startup …. I will always give credits to you man

  5. the course link is actually not correct. it goes to some different stuff.
    You use Atom, not Brackes as you say in the description.

  6. You know the best part is that I never really understood the XMLHttpRequest thing and always just did it with jQuery until today, I have no idea how you explain things so damn well. Thank you!

  7. Is it redundant to check readyState == 4 && status == 200? Could a status ever be 200 if the request was not completed?

  8. Even thought I think I have a good idea of how async code works, I love watching the video's that you guys put out. They are really great!

  9. This is superb work, thank you. Hope you're being rewarded for your efforts.

    I like the way you talk and explain as you code! Something so simple as "If readystate is equal to 4"… has fixed the meaning of == meaning equal in my mind, which I could not get used to before!

    Thank you again,

  10. Great tutorial as far as the javascript goes, but I would like there to be a bit more information on how to set up the dev environment and actually run the code. I am using Atom and have the atom-live-server plugin installed, but it just opens up a browser tab listing the source code. It doesn't run anything. I know how to embed a script in an html page but the impression given by this tutorial is that you can just run the JavaScript as is.

  11. Love the tutorials. Information is always perfectly presented for any level of coder. Any plans on a object oriented php, or maybe just php for beginners tutorial?

  12. Thanks! The tutorial is very helpful;) By the way, is there a way to save a chunk of data from the request to pass it to a different API? I created a function that connects to the Google maps API but I failed to pass the data I got to connect to the Dark Sky Weather API. The function returns "undefined" every time I try to store the data from Google in a variable.

  13. Good tutorial , well done. My ajax request is not going until the step 4. It looks it's stucked at 3.What could be the reason of it?


Please enter your comment!
Please enter your name here