Day 1 of 21 Days of Javascript

I've long avoided trying to learn Javascript. It's virtually everywhere (including this web browser) and it's the number 1 programming language in the world (see chart below.)

I much prefer Python, which I've used for a few years now. I got to an intermediate level with it and completed enough coding challenges on Code Wars to be in the top 10% of their active users at the time of writing.

This doesn't mean I'm particularly great at Python. But I know enough to get by. I'd like to do the same for Javascript and so I'm going to spend the next 21 days diving into the language with the help of the following:

  • the Eloquent Javascript book;
  • various Youtube tutorials,
  • coding challenges at Code Wars, and
  • ChatGPT's study mode (I don't want to use AI code generation during the learning process but I will use AI to help me understand some concepts better).

Day 1 Learnings

  • First thing I need to do is move from my python habits to JS habits. Here are some early distinctions on variable declarations and functions that I have to get used to.
// How it's done in JS
let myVar = 3;
const myOtherVar = 5;

function addNum(a, b) {
    let result = a + b;
    return result;
}
# How it's done in Python
myVar = 3
myOtherVar = 5

def add_num(a, b):
    result = a + b
    return result

Top Programming Languages (Stack Overflow Survey)