Index
Overview
JavaScript is dynamically typed which basically means variable types do not need to be declared but rather they are determined "on the fly" (as the program runs).
This makes for much lighter coding relative to a language like Java, however it also means that it is not type safe which can lead to more bugs.
To offset this potential we need solid test code (more on this later). However, this type of testing is needed all programming languages simply due to the complexity of software combined with the the sneaky nature of bugs.
How To Take This Course
General Sugs
This applies to us as beginners.
The first note is that learning a coding language is not based on a lot of memorization. It's more of a creative science.
However, when first learning a computer language there is a small vocabulary we'll get familiar with.
While a human language might have a million words (they say), if we learn ten to twenty core terms in js we'll be sitting pretty good (not a bad deal).
Iterative Learning
Do not get stuck on a concept. The best way to learn is iteratively:
- read concepts (initial quick scan)
- code
- re-read concepts
- code
- keep this loop going...
Some concepts are abstract and can take time to root (at least for me). So literally zip through your first reading, do some coding and circle back.
Foundational Concepts
There are a few foundation or base concepts that will be highlighted in this course. We'll tackle those early.
Symbols in the notes
💡 indicates extra importance
👌🏼 indicates partial understanding is fine
Good Language to Learn
Js is very common. That is awesome for learning, because the web is packed with information about it.
When we're learning js, we know that when we run into a new puzzling subject, that we can quickly find many good sources on it via a subject search, and then take the time to learn it.
Thus, with a little patience and practice, you will speak JavaScript.
History
JavaScript went live in about 1995.
Much of its syntax is similar to Java but there is no relationship between the languages.
It has had many major revisions. Possibly it is now entering a stable period (or not, time will tell).
Pros and Cons
JavaScript is a nice lightweight language. Lightweight is a big advantage -- e.g. less is more.
Js is extremely unconstrained which is both an asset and liability:
- An asset because it gives us coders almost unlimited creative freedom
- A liability because it can lead to cute and clever (i.e. tricky) code which becomes a headache to extend and maintain
There is even a popular book titled "JavaScript: The Good Parts" which of course implies the language has significant "bad parts".
In this course, our goal will be to write simple code. This is not always easy, and usually requires an iterative approach. If we achieve it, then our code will be pleasant, not painful, to maintain.
One way we'll achieve this is taking an oo approach. It took js many language iterations, but js has finally provided coder-friendly oo.
JavaScript Guide
(Chapter 101 - Introduction)