What's the difference between JavaScript and Java?

What's the difference between JavaScript and Java?


Java and Javascript are similar like Car and Carpet are similar.


One is essentially a toy, designed for writing small pieces of code, and traditionally used and abused by inexperienced programmers.

The other is a scripting language for web browsers.