What is JavaScript?
JavaScript is the programming language of the web. Every interactive website you’ve ever used — clicking buttons, loading new data without refreshing, updating a shopping cart — that’s JavaScript running in the browser.In this course, you’ll use JavaScript for two things: building React frontends and connecting them to your FastAPI backend. That covers the vast majority of what full-stack web developers do with JavaScript.
JavaScript vs Python
You already know how to program. JavaScript and Python share the same core concepts — variables, functions, loops, objects. The differences are mostly syntax.Syntax basics
JavaScript has three syntax rules that differ from Python. Once you internalize these, the rest feels familiar.Semicolons
Curly braces
{} define blocks of code — function bodies, if/else branches, loops. Indentation is optional (but you should still indent for readability).
Case sensitivity
userName, UserName, and USERNAME are three completely different variables. The convention is camelCase for most things, PascalCase for React components, and UPPER_CASE for constants.
Comments
// for single-line comments, /* */ for multi-line. Same idea as Python’s #, just different characters.
Running JavaScript
You’ll run JavaScript in two places during this course:Browser console (for quick experiments)
Open any browser, pressF12 (or Cmd+Option+J on Mac), and type directly into the Console tab.
Node.js (for files and projects)
Create a.js file and run it with Node:
hello.js
What’s next?
Now that you know how JavaScript fits into web development and how its syntax compares to Python, let’s start writing real code. First up: storing data in variables.Variables
Store and manage data using let and const