32 minutes ago · 6 min read1190 words · Tech · hide

I am here to perform the forbidden comparison. Everyone says that JavaScript has nothing to do with Java, even though their names are similar: “The two languages are entirely distinct.” “Java is to JavaScript as ham is to hamster.” JavaScript’s name was “an attempt to piggyback on the popularity of Java, an entirely unrelated language.” This long-held belief is, in my opinion, inaccurate. Java and JavaScript have a lot in common. Wake up to the truth!!! They have similar syntax According to JavaScript’s creator, “the diktat from upper engineering management was that the language must ’look like Java’.” This happened! JavaScript looks like Java! A lot of code works identically in the two languages. Comments are identical: // Single-line comments are the same. /** Block comments are also the same. */ Many expressions work the exact same way: "Hello world" 12 + 34 true && false myObject.myMethod(1, 2, 3); Conditionals are also identical: if (coinflip()) { return "heads"; } else { return…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town