Introduction to JavaScript Kirkwood Continuing Education © Copyright 2014, Fred McClurg All Rights Reserved
Course Goals Conversant not fluent Read and write code Syntax familiarity Variables Control structures Looping Data types Dynamic behavior 2
JavaScript History 1995: LiveScript (Netscape) by Brendan Eich 1996: Renamed by Sun to JavaScript for Netscape : Microsoft JScript for IE : ECMA Standardized language and renamed to ECMAScript 2009 ECMAScript 5.0 standard 3
4 Where does JavaScript fit? HTML: Structure and Content (skeleton) Markup Language CSS: Presentation (cosmetics) Style Sheet Language JavaScript: Browser Behavior (muscles) Client Programming Language PHP: Database Connection & Dynamic Content (internal organs) Server Programming Language
JavaScript is Limited (intentionally) JavaScript is not Java Runs in the client’s browser No access to file system (security) Can’t open client files Can’t make database connection Can be disabled 5
JavaScript Advantages Development tools not required Only text editor necessary No license fees Native to multiple browsers Works with server technologies (e.g. PHP, ASP, JSP, etc.) 6
JavaScript Characteristics Interpreted language (not compiled) Case sensitive (case matters) Each statement ends with a semi- colon (optional) Long statement can be split to multiple lines Spaces are ignored (except inside strings) 7
JavaScript Resources w3schools Mozilla Developer Network en-US/docs/Web/JavaScript 8