JavaScript Katie Fowle November 15, 2011
History Brendan Eich at Netscape, 1995 Need for interactivity in web pages Mocha, LiveWire, LiveScript, then JavaScript Not taken seriously at first ▫Called “beginner’s language” or “toy” Brendan Eich CTO, Mozilla Corporation
Quote from the Creator “ JS had to “look like Java” only less so, [it had to] be Java’s dumb kid brother or boy-hostage sidekick. Plus, I had to be done in ten days or something worse than JS would have happened”
The Language Primary use is Web page enhancement Integrated into the browser Interpreted Weakly Typed Latest Version 1.8.5
JavaScript NOT Java SimilaritiesDifferences C- style syntax Object-Oriented Key words Standard Library naming conventions Math and Date objects Scripting languge Some functional features Weakly typed Loaded as source code Prototype-based
Web Uses Form validation Event handling User interaction ▫alert(), confirm(), prompt() Dynamic content
Data Types Primitive types ▫Numeric, string, boolean Objects ▫Built in: Object, Date, Array, Math, Function, RegExp, Number, String, and Boolean
Object() constructor
Literal notation
Custom Constructor
Evaluation Readability Writability Reliability Cost
Cool Uses ples-html5-javascript-uses/ ples-html5-javascript-uses/ make-amazing-use-of-javascripthttp:// make-amazing-use-of-javascript