![java vs javascript java vs javascript](https://i.ytimg.com/vi/NPMQwtiHfvk/maxresdefault.jpg)
JAVA VS JAVASCRIPT ANDROID
You probably know that the Android OS is written in Java, as are native Android apps. Java was designed with a Write Once Run Anywhere (WORA) philosophy in mind. JavaScript files use the ".js" extension. JavaScript is a object-based scripting language. JavaScript is a prototype based-language. What do Java and JavaScript have in common? What are the main differences? Main differences between Java and Javascript OK, history lesson over - now let's compare the two. Whether that's true or not, it's the name we're stuck with! On the other hand, many say the name JavaScript was chosen purely as a marketing ploy - to hitch a ride on the Java success train, as it were. Actually, JS was first called "Mocha", but the name was changed to "LiveScript", and later changed again to "JavaScript" (I guess "Mocha" was too subtle). That might have been a tip of the hat to Java's influence on JavaScript's syntax. It's its own thing entirely, and works quite differently under the hood. So there was some influence there, perhaps, but it's definitely not an off-shoot, fork, or a version of Java. Is JavaScript based on Java?Įich based the syntax of the new language on Java, which is why the two languages look pretty similar in a text editor. So they got a guy named Brendan Eich to make the new language, which he did in about 10 days (Eich also co-founded Mozilla, created the Brave browser, and developed the BAT cryptocurrency!). Instead, they decided to make their own language. However, Netscape soon decided that Java wasn't the best option for dynamic websites. Java was the hot programming language at the time (around the mid-1990s), and it was designed to be used pretty much anywhere (more on that later) - so this made sense.
![java vs javascript java vs javascript](https://s4.itho.me/sites/default/files/styles/picture_size_large/public/field/image/jie_tu_2020-06-02_xia_wu_5.05.26.jpg)
Netscape, one of the early browser pioneers, wanted to change all that.įirst, they tried embedding Java into their browser. In the early days of the web, pages were totally static - no dynamic interaction happened once the page had loaded. (If you’d rather skip this brief history lesson just get straight into the differences between Java and JavaScript) So here's everything you need to know about these two languages, and the main differences between them. An off-shoot of some sort, perhaps.Įxcept it isn't! The two languages might share the name Java, but they are definitely not the same. So JavaScript must be a programming language made by the same folk who develop Java. An Apple Macintosh is a type of computer made by Apple. It has "Java" in the name - so you'd think it'd be related to Java in some way, maybe JavaScript is part of Java or something.Ī Ferrari SF90 is a type car made by Ferrari. If there was an award for the most confusing branding name, "JavaScript" would surely be a nominee.