How do they compare?
How do they compare?
They both have C-style brace syntax
They both have “Jave” in the name
I think that's about it
Similar syntax is even pushing it.
fǘǵ, Java* in their names
Both are garbage collected
Java has static typing, JavaScript has dynamic typing
Variables are 'hoisted' to the top of a function in JS
Both are JIT-compiled
Java isn't JIT
They don't, Java is OOP, JS is bastardized FP.
>
>Java isn't JIT
All good modern implementations of JavaScript have JIT since there's a strong need for execution speed.
And all java runtime engines have jit
It's been JIT for years now fâm
Java is *the* language that made JIT popular. Of course it has JIT.
Both of the language's names match the following RegEx: /^Java/
This piece of code works in both languages:
// Infinite loop!
while (true) {
// :^)
}
Neither language should be used to create GUI applications for the desktop.
I'm seeing a pattern here, OP.
>Variables are 'hoisted' to the top of a function in JS
>not being a letfag
Well one is a bit less garbage then the other.
Java is object oriented
JavaScript is functional
>JavaScript is functional
lmao, no
Like apples and oranges.
Well they're both garbage, so there's that.
Java is object oriented
JavaScript is object oriented (with prototypes!), functional, imperative, and basically everything
If they nothing to do with one another why are they named so similarly?
Marketing
>Both are garbage collected
I keep hearing these things about both languages. Both languages have made such a tremendous impact (it's irrelevant whether they are actually good or not), that simply calling them garbage is really pushing it.
This level of stupidity has to be bait...right?
Like apples and oranges.
/thread
They're both garbage