

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Learn JavaScript
incomplete
2: Basic Variables
incomplete
3: let and const
incomplete
4: Why JavaScript?
incomplete
5: Comments
incomplete
6: Numbers in JS
incomplete
7: Numbers Review
incomplete
8: Increment and Decrement
incomplete
9: Undefined vs. Undeclared
incomplete
10: Null vs. Undefined
incomplete
11: Dynamic and Weak
incomplete
12: Same Line Declarations
incomplete
13: JavaScript's Speed
incomplete
14: Strings
incomplete
15: Template Literals
incomplete
16: Java vs. JavaScript
incomplete
17: Semi-Colons in JS
incomplete
18: String Encoding
incomplete
19: Camel Case in JS
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
A very common misconception is that Java and JavaScript are the same, or even just similar. Here's my favorite analogy for demonstrating how untrue this is:
Java is to JavaScript as car is to carpet
Java and JavaScript are not the same, and they often aren't even used for the same kinds of things.
Java is a statically-typed, object-oriented language that compiles to byte code and runs on the Java Virtual Machine. It's used for all sorts of things, but most commonly for server-side applications, Android apps, and large enterprise systems. If this picture were a programming language, it would probably be Java:
JavaScript is a dynamically and weakly-typed language that runs natively in the browser and out of the browser with dedicated runtimes like Node.js, Deno or Bun. It originally only ran in the browser and was named "JavaScript" because back when it was created in the 90's, Java was very popular and the creators wanted to get a piece of that marketing value.
Brendan Eich, the creator of JavaScript, was given only 10 days to create the language. He was told to make it look like Java, but to make it work in the browser. The rest is history.