Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript About JavaScript Basics

Niyamat Almass
Niyamat Almass
8,176 Points

what is the difference between java and javascript

Can anyone tell me the majority between java and javascript?

8 Answers

According to Wikipedia:

JavaScript, despite the name, is essentially unrelated to the Java programming language, although both have the common C syntax, and JavaScript copies many Java names and naming conventions. The language was originally named "LiveScript" but was renamed in a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun's Java runtime with their then-dominant browser. The key design principles within JavaScript are inherited from the Self and Scheme programming languages.

Thank you miguelcastro2.

Funny answer now - the difference is as between car and carpet :)

Java is also an island in Indonesia.

Java code gets compiled to bytecode to be understood by the machine (personal computer/server), Javascript doesn't need to be compiled into bytecode, and it is easily interpreted directly.

Java and Javascript languages use different implementation for inheritance, classical inheritance and prototypal inheritance respectively.

Java features and standards are handled and Implemented by oracle now a days, Javascript features and standards are decided by ECMA and solutions/syntax of these standards implemented by the browser creators (like, Google Chrome, Safari) for us, so we can write a syntax that browsers can understand.

Java was born to replace c++, mainly for computations and write once, run anywhere purposes, Javascript was born to be the scripting language in the browser, that can add behavior to the webpages.

Today - Java is used in mobile app development, IoT, server side programming, Desktop apps, Games. Javascript is used at all of these uses mentioned in Java + it is used in the browser too.

This is an extremely useful explanation, because it also tells me what Java does. That's quite a skill stack, so maybe I will tackle it next. Thank you, bhrugu!

ibrahim dirir
ibrahim dirir
11,290 Points

Javascript and java is like Carpet and Car

I have seen someone having a Carpet inside their car before, so your are saying that I can use Java Inside my Javascript sometimes? hehehheeee :)

Good one Aleksander! ?

What is a scheme based language? I heard that JavaScript borrows a lot from scheme and it is great but I have no idea what it means and why it is great.



  • test
  • hei
app.use(async function(ctx) {
  const body = ctx.request.body;
  if (!body.username) ctx.throw(400, '.username required');
  if (!body.password) ctx.throw(400, '.password required');

  ctx.body = { 
    code: 201,
    message: '登陆成功',
    jianCeZhe: '张三',
    jianCeDanWei: "光明农场"
Danny Duque
Danny Duque
21,404 Points

Good explanation of differences. -- Yoog