FANDOM


For a description and history of this wiki, see Project:About.
Not to be confused with Java.
This article is a stub. You can help the JavaScript Wiki by expanding it.
Template:Mainonly

JavaScript is a scripting language included with all the major Web browsers. It allows Web designers to add interactivity to their Web pages without resorting to Java or Flash.

Officially, JavaScript is only the originating ECMAScript dialect, implemented in Mozilla applications. Microsoft's implementation is JScript, while all other browser vendors illegally refer to their respective ECMAScript implementations as JavaScript without prosecution. It was invented by Brendan Eich for Netscape Navigator (whose source was code-named Mozilla) and named Mocha originally, then LiveScript, and finally, with Sun's permission, JavaScript.

JavaScript, a weakly typed language, is most commonly used for client-side Web development. Java and JavaScript are unrelated, and share only the names and some superficial syntax, such as the usage of "seagulls" ('{' and '}') for blocks, and the pre- and postfix operators of ++ and ––.

History Edit

JavaScript was going to be named 'LiveScript' but the names was changed to JavaScript because a Co-Marketing Deal with Netscape which in return Netscape would add support for Java runtime Enviroment with there Browser. before it was named 'LiveScript' it was actually called 'Mocha' named and created by a member of Netscape named Brendan Eich, he was the original creator of JavaScript.

Hello World Edit

The Easiest Way to make the most common 'Hello World' Code.

<script type="text/javascript">
<!--
document.write("Hello World!");
//-->
</script>

Identifying Edit

JavaScript has many things different from the programing languages you may know, and may also have a lot of similarities. The main things in JavaScript (which would be a good way to identify if a code is JavaScript or not) are these:

  • JavaScript variables are not locked into one type, meaning a variable can have one value which is an int (integer) and be assigned a text (string) as seen in this example:
<script type="text/javascript">
<!--
var Varname = "10 ";
document.write(Varname);
var Varname = "Apples";
document.write(Varname);
//-->
</script>

Which would make a output "10 Apples"

  • In seen in many programming languages Methods or Classes (as most commonly known from Java has been changed to Function's such as below
<script type="text/javascript">
<!--
function functionName () {
document.write("Function Acvitivated");
}
//-->
</script>

To Activate the function the coder would type in "FunctionName();" or make a input button to activate it With HTML

<form>
  <input type="button" value="Click Me" onClick="FunctionName();">
</form>

Tutorials Edit

See AlsoEdit

External linksEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.