A bit of history
The first attempts to create a new convenient language wereundertaken in 1992 by Nombas. The basis was taken language S. The final version has acquired the name CEnvi. However, this product has not received much distribution. Then the programmer Brendan Eich, Netscape co-founder Mark Andrissen and co-founder Sun Bill Joy took up the case. They cherished the dream of creating a language that could unite all parts of the web interface, and at the same time would be easy to learn and use. The syntax was taken from the fashionable at that time high-level languages - SI and Java.
Application inside web pages
Introduction to the document occurs by specifyingspecial tags, indicating the beginning and end of the script - <script> and </ script>. As a rule, embedding a script directly into HTML-code is considered a mauveton. A more elegant and recognized way is to put the code in a separate file, and then connect it to the right place on the page.
alert (`Hello World!`);
This is the simplest implementation, with the help ofwhich you can see the basic elements and their use. Variables are declared in the language by specifying the var keyword and the subsequent name. For example, this is: var variablename.
Communication with Java