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 trialNiyamat Almass
8,176 Pointswhat is the difference between java and javascript
Can anyone tell me the majority between java and javascript?
8 Answers
miguelcastro2
Courses Plus Student 6,573 PointsAccording 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.
Manuel Lerman
Courses Plus Student 1,184 PointsFunny answer now - the difference is as between car and carpet :)
Unsubscribed User
398 PointsJava is also an island in Indonesia.
bhrugu desai
200 PointsJava 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.
rhupp
11,019 PointsThis 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
11,290 PointsJavascript and java is like Carpet and Car
Aleksander Koldal
4,191 PointsI have seen someone having a Carpet inside their car before, so your are saying that I can use Java Inside my Javascript sometimes? hehehheeee :)
Lawrence Wachira
593 PointsGood one Aleksander! ?
byteknacker
Courses Plus Student 2,984 PointsWhat 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.
jeff zhang
Front End Web Development Techdegree Student 500 Points我是标题1
我是标题3
- 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: "光明农场"
};
});
Omar Patel
23,055 PointsGood explanation of differences. -- Yoog
Adrian Hoyle
3,596 PointsAdrian Hoyle
3,596 PointsThank you miguelcastro2.