Javascript vs. Java

Extracted from a Presentation by Dwain Fagerberg, Solution Architect at Axian

JavaScript (Not Java-lite)

History (or, why would they name it JavaScript?)

  • JavaScript is an implementation of ECMA-262.
  • JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha
  • Later named LiveScript
  • Finally renamed to JavaScript as part of a co-marketing deal between Netscape and Sun Microsystems
Java is a statically typed, JavaScript is dynamically typed
  • You do not have to specify the data type of a variable when you declare it.
  • Data types are converted automatically as needed during script execution

var answer = 42;
And later, you could assign the same variable a string value, for example:
answer = “Thanks for all the fish…”;