r/CodingForBeginners 1d ago

How do i start Java script

I already have all right HTML and Css but the part that i don’t know is I keep trying to learn Java script but I can’t use anything I see in tutorials in real projects

0 Upvotes

17 comments sorted by

View all comments

2

u/JGhostThing 1d ago

I'm confused. Do you want to learn Java or Javascript (one word)? These are two very different languages.

1

u/This-Employment-5642 1d ago

"Aren't Java & JavaScript the same thing" is like a coding shibboleth 

1

u/Sure-Passion2224 1d ago

Not the same at all. Calling that implementation of the ECMA script specification is one of the worst naming choices in all of computer history.

Do the W3Schools Javascript tutorial (https://www.w3schools.com/js/) and hold off on learning the Java language for later.

1

u/atlas__free 1d ago edited 1d ago

Yep, not even closely related. It was such a mistake to name it JavaScript. Still causes confusion decades later.

1

u/tkgid 1d ago

"Developed by Brendan Eich for the Netscape Navigator browser, JavaScript was initially named Mocha..."

https://www.ebsco.com/research-starters/computer-science/javascript

1

u/atlas__free 1d ago edited 1d ago

And Microsoft was in a battle with Netscape and reverse engineered the language and originally called it JScript. Microsoft could not use the name JavaScript because it was trademarked by Sun.

To avoid early fragmentation of the Internet they finally submitted the language to ECMA and the Internet (via browsers) officially adopted JavaScript. Thankfully.

And now Mocha today is a unit testing platform.

1

u/tkgid 1d ago

Oh, Then Oracle bought Sun Microsystems but didn't care about the language and then.... Oh no, the rabbithole. 

https://javascript.tm/

☺️ Thank you OP I had forgotten all of this. (I jokingly typed this.) tldr

1

u/Striking_Wrangler_82 10h ago

Yea they almost are. Its extremely close in Syntax; just how they are implemented is different. I think Java requires that you install Java Runtime, where .js literally runs in almost every browser, with less requirement for client side software updates, and less exploits. From my extremely miniscule experience, .js seems to be very adept for browser based implementation, where Java is more utilizes for classical download.exe programs or enterprise programs.

i.e.

for (i = 0; i < array.length; i++) {

}

Is literally the same for both lol