Java vs Javascript

Good day to all,

I am new to this and was wondering what is the difference between Java and Javascript? Which is considered an interpreted language or compiled language?

I am kind of confused, hope to have someone clear my misunderstanding.

Thank you.

The joke is often “Java is to JavaScript as car is to carpet”.

That is a bit of overstatement. They both descend from the C language so they are similar in many ways. Sometimes I have to look closely to make sure which one I’m looking at. But there are also some major differences in how they work. The similarity in names has more to do with marketing - Java was very popular at the time.

JS is the language for frontend web development (web pages) - for this work, you must know JS. For backend web dev (servers) both JS and Java are options and there are other options. Java can also be used in other applications. Java also used to be used as a teaching language because it is so structured and object oriented (which was trendy for a while but is not “the thing” anymore, but still an important paradigm) but it looks like Python is taking over as the default teaching language.

If you want to do web dev, then you must learn JS. It is a must for the frontend (the client, what you see in the browser) and is an option for the backend (servers). Java is a popular option for the backend but JS is increasingly popular too (in the Node environment, which FCC also teaches).

FCC does not teach Java - not that there’s anything wrong with it. Maybe we will in the future. If you want to do something besides web development, then JS is probably not the best option and that is a completely different conversation.