This is an introduction to JavaScript for NICAR 2022. This class assumes you know the basics of HTML and CSS. Everything in this repo is available publicly on my personal GitHub.
lesson
: This will be the code you edit. I've already created a couple of empty script files for you, as well as some skeleton HTML.demo
: The end result of the code if you get stuck or want to peruse or return to at a later time.
I'm following along with the outline I wrote in the file called lesson-v2.md
. It might be confusing if you try to read along while we do live coding.
After the session, you can try to follow the lesson I wrote that's available in the file called lesson.md
. This was the first draft of my lesson, and has some more information and concepts to learn. There are also some exercises you can do after the lesson at the end of the lesson.md file, linked here.
If you want to work on the exercises later — when you don't have the same development environment as in-class — you should be able to download any of these text editors and pick up where you left off without any problems:
They all work more or less the same, and since JavaScript runs in the browser, you'll be able to edit your code files in your text editor and refresh the web page to see any changes/run the code, just like in the session.
If you get stuck, StackOverflow is a good place to search for help. You'll get the most mileage if you learn how to search specific errors that are logged in your console, or can craft a good "how to do xyz javascript". If you get hopelessly stuck, feel free to email me if you have any questions or need any clarification about this material.
Here are some places for continued learning:
- Eloquent Javascript book
- javascript.info
- MDN Web Docs
- Learn Enough JavaScript - paid
- a good place to continue learning HTML and CSS: https://htmlandcssguidebook.com/index.html
- HTML and accessibility
- Introduction to Web APIs