Java

Solo disponible en BuenasTareas
  • Páginas : 21 (5103 palabras )
  • Descarga(s) : 0
  • Publicado : 14 de febrero de 2011
Leer documento completo
Vista previa del texto
A (Re)-Introduction to JavaScript
Simon Willison - http://simonwillison.net/ Notes made for a 3 hour tutorial at ETech in San Diego, March 6th 2006 INTRODUCTION .................................................................................................... 1 OVERVIEW ............................................................................................................. 2 NUMBERS............................................................................................................... 2 STRINGS.................................................................................................................. 4 OTHER TYPES ........................................................................................................ 4 VARIABLES............................................................................................................ 5 OPERATORS ........................................................................................................... 5 CONTROL STRUCTURES...................................................................................... 6 OBJECTS:................................................................................................................ 7 ARRAYS .................................................................................................................. 9 FUNCTIONS ...........................................................................................................10 CUSTOM OBJECTS ...............................................................................................13 INNER FUNCTIONS..............................................................................................17 CLOSURES.............................................................................................................17 MEMORY LEAKS..................................................................................................18

INTRODUCTION
My name's Simon Willison, and the title of this sessionis "A re-introduction to JavaScript". Why a re-introduction? Because JavaScript has a reasonable claim to being the world's most misunderstood programming language. While often derided as a toy, beneath its deceptive simplicity lie some powerful language features. The last year has seen the launch of a number of high profile JavaScript applications, showing that deeper knowledge of this technologyis an important skill for any web developer. It's useful to start with an idea of the language's history. JavaScript was created in 1995 by Brendan Eich, an engineer at Netscape, and first released with Netscape 2 early in 1996. It's was originally going to be called LiveScript, but was renamed in an ill-fated marketing decision to capitalise on the popularity of Sun Microsystem's Java language -despite the two having very little in common. This has been a source of confusion ever since. Microsoft released a mostly-compatible version of the language called JScript with IE 3 several months later. Netscape submitted the language to Ecma International, a European standards organisation, which resulted in the first edition of the Ecmascript standard in 1997. The standard received asignificant update as Ecmascript edition 3 in 1999, and has stayed pretty much stable ever since - although edition 4 is currently in the works.

This stability is great news for developers as it's given the various implementations plenty of time to catch up. I'm going to focus almost exclusively on the edition 3 dialect. For familiarity, I will stick with the term JavaScript throughout. Unlike mostprogramming languages, the JavaScript language has no concept of input or output. It is designed to run as a scripting language in a host environment, and it is up to the host environment to provide mechanisms for communicating with the outside world. The most common host environment is the browser, but JavaScript interpreters can also be found in Adobe Acrobat, Photoshop, Yahoo!'s Widget engine...
tracking img