Introduction to Web Tech and Programming
|
|
- Jocelin Fleming
- 6 years ago
- Views:
Transcription
1 Introduction to Web Tech and Programming
2 Objects Objects Arrays
3 JavaScript Objects Objects are an unordered collection of properties. Basically variables holding variables. Have the form name : value name is always String. value can be primitive or object
4 JavaScript Objects JavaScript has two types of values Primitives (String, Number, Boolean, etc.) Objects String* Number* Boolean* Date Math Regular Arrays Functions Objects
5 JavaScript Objects Examples var person = {firstname:"mike", lastname:"jones"}; var car = {make: "Honda", model: "Civic", enginesize: 2000}
6 Creating JavaScript Objects Define and create a single object using an object literal Define and create a single object using the new keyword Define an object constructor, and then create objects of the constructed type
7 Creating JavaScript Objects Define and create a single object using an object literal var person = {firstname:"mike", lastname:"jones", height:6.2};
8 Creating JavaScript Objects Define and create a single object using the new keyword var person = new Object(); person.firstname = "Mike"; person.lastname = "Jones"; person.height = 6.2;
9 Creating JavaScript Objects Define an object constructor, and then create objects of the constructed type function person(first, last, height) { } this.firstname = first; this.lastname = last; this.height = height; var myfather = new person("mike", "Jones", 6.2); var mymother = new person("manna", "Jones", 5.6);
10 The this Keyword this is a reference (keyword, not a variable) to the object that owns the currently executing JavaScript code In a function it refers to the object that owns the function In an object, it refers to the object itself Does not have a value in an object constructor, value substituted for new object
11 JavaScript's Built-in Constructors Available constructors var obj1 = new Object(); // A new Object object var obj2 = new String(); // A new String object var obj3 = new Number(); // A new Number object var obj4 = new Boolean() // A new Boolean object var obj5 = new Date(); // A new Date object var obj6 = new Array(); // A new Array object var obj7 = new RegExp(); // A new RegExp object var obj8 = new Function(); // A new Function object Math is a global object, and does not have a constructor
12 JavaScript Object Literals Object literals are more efficient var x1 = {}; // new object var x2 = ""; // new primitive string var x3 = 0; // new primitive number var x4 = false; // new primitive boolean var x5 = []; // new array object var x6 = /()/ // new regexp object var x7 = function(){}; // new function object
13 JavaScript Object Properties Accessing objectname.property objectname["property"] objectname[expression]
14 For In Loops The JavaScript for-in statement loops through the properties of an object Example var person = {fname:"john", lname:"doe", age:25}; var text = ""; var x; for (x in person) { } text += person[x];
15 Object Properties You can add new properties to an existing object by simply giving it a value person.haircolor = "Beige" You can delete properties using the delete keyword var person = {firstname:"john", lastname:"doe", age:50, eyecolor:"blue"}; delete person.age; // or delete person["age"];
16 Object Methods Methods are actions that performed on object Object properties can be functions An object method is an object property containing a function Syntax methodname : function() { code lines }
17 Object Methods Built in methods var message = "Hello world!"; var x = message.touppercase(); alert(x); // Message dialog displays HELLO WORLD!
18 Adding new Object Methods Methods can be added using any object creation mechanism Example function person(firstname, lastname, age) { this.firstname = firstname; this.lastname = lastname; this.age = age; this.eyecolor = eyecolor; this.getfullname = function () { return this.firstname + " " + this.lastname; } }
19 Function Parameters and Arguments Functions can have parameters functionname(param1, param2, para3) { } code to be executed Function parameters are the names listed in the function definition Function arguments are the real values passed to (and received by) the function
20 Parameter Rules JavaScript function definitions do not specify data types for parameters JavaScript functions do not perform type checking on the passed arguments (see Rule 1) JavaScript functions do not check the number of arguments received
21 Parameter Defaults If a function is called with missing arguments (less than declared), the missing values are set to: undefined You may want to assign a default value to the parameter function myfunction(x, y) { } if (y === undefined) { } y = 0; If a function is called with too many arguments (more than declared), they will not have a name, and can only be reached in the arguments object.
22 The Arguments Object JavaScript functions have a built-in object called the arguments object The argument object contains an array of the arguments used when the function was called (invoked)
23 The Arguments Object Example function findmax() { var i, max = Number.MIN_VALUE; for (i = 0; i < arguments.length; i++) { if (arguments[i] > max) { max = arguments[i]; } } return max; } x = findmax(1, 123, 500, 115, 44, 88);
24 JavaScript Arrays An array is a variable that can hold multiple values Syntax var buildings = ["Beury", "SERC", "Tuttleman"] Allows you to loop through a list of values to perform various operations Individual values are accessed using an index number
25 JavaScript Arrays Think of an array as a special type of object that uses numbers to access its elements instead of property names The first element is stored at index 0, the second element at index 1, etc. mycars[0] = "Accord"; alert(mycars[1]); You can have different objects in one array myarray[0] = Date.now; myarray[1] = myfunction; myarray[2] = mycars;
26 Array Properties and Methods Array objects have various properties and methods var x = myarray.length; // The length property returns the number of elements var y = myarray.sort(); // returns a sorted copy
27 Array Properties and Methods Property constructor length prototype Description Returns the function that created the Array object's prototype Sets or returns the number of elements in an array Allows you to add properties and methods to an Array object
28 Array Properties and Methods Method concat() indexof() join() lastindexof() pop() push() reverse() shift() slice() sort() splice() tostring() unshift() valueof() Description Joins two or more arrays, and returns a copy of the joined arrays Search the array for an element and returns its position Joins all elements of an array into a string Search the array for an element, starting at the end, and returns its position Removes the last element of an array, and returns that element Adds new elements to the end of an array, and returns the new length Reverses the order of the elements in an array Removes the first element of an array, and returns that element Selects a part of an array, and returns the new array Sorts the elements of an array Adds/Removes elements from an array Converts an array to a string, and returns the result Adds new elements to the beginning of an array, and returns the new length Returns the primitive value of an array
29 Looping through an Array var buildings = ["Beury", "SERC", "Tuttleman", "Wachman"]; for (var i = 0; index < buildings.length; i++) { } text += " " + buildings[i];
30 Use Array Literal Avoid using the new Keyword when creating Arrays as this creates complications var points = new Array(40, 100); Creates an array with two elements (40 and 100) var points = new Array(40); Creates an array with 40 undefined elements
JAVASCRIPT. JavaScript is the programming language of HTML and the Web. JavaScript Java. JavaScript is interpreted by the browser.
JAVASCRIPT JavaScript is the programming language of HTML and the Web. JavaScript Java JavaScript is interpreted by the browser JavaScript 1/15 JS WHERE TO
More informationClient-Side Web Technologies. JavaScript Part I
Client-Side Web Technologies JavaScript Part I JavaScript First appeared in 1996 in Netscape Navigator Main purpose was to handle input validation that was currently being done server-side Now a powerful
More informationJavascript Arrays, Object & Functions
Javascript Arrays, Object & Functions Agenda Creating & Using Arrays Creating & Using Objects Creating & Using Functions 2 Creating & Using Arrays Arrays are a type of object that are ordered by the index
More informationXML JavaScript Object Notation JSON Cookies Miscellaneous What Javascript can t do. OOP Concepts of JS
LECTURE-4 XML JavaScript Object Notation JSON Cookies Miscellaneous What Javascript can t do. OOP Concepts of JS 1 XML EXTENDED MARKUP LANGUAGE XML is a markup language, like HTML Designed to carry data
More informationID1354 Internet Applications
ID1354 Internet Applications JavaScript Leif Lindbäck, Nima Dokoohaki leifl@kth.se, nimad@kth.se SCS/ICT/KTH Overview of JavaScript Originally developed by Netscape, as LiveScript Became a joint venture
More informationSuch JavaScript Very Wow
Such JavaScript Very Wow Lecture 9 CGS 3066 Fall 2016 October 20, 2016 JavaScript Numbers JavaScript numbers can be written with, or without decimals. Extra large or extra small numbers can be written
More informationCITS1231 Web Technologies. JavaScript Math, String, Array, Number, Debugging
CITS1231 Web Technologies JavaScript Math, String, Array, Number, Debugging Last Lecture Introduction to JavaScript Variables Operators Conditional Statements Program Loops Popup Boxes Functions 3 This
More informationPEMROGRAMAN BERORIENTASI OBJECT. Indra Gunawan, ST., M.Kom., CEH., CHFI
PEMROGRAMAN BERORIENTASI OBJECT Indra Gunawan, ST., M.Kom., CEH., CHFI OUTLINE MATERI 1. Object Oriented Programming Introduction. 2. Javascript Introduction. 3. Javascript Object and Class/Function. 4.
More informationLecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript
Lecture 3: The Basics of JavaScript Wendy Liu CSC309F Fall 2007 Background Origin and facts 1 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static content How
More informationCSC Web Programming. Introduction to JavaScript
CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its
More informationCOMS 469: Interactive Media II
COMS 469: Interactive Media II Agenda Review Ch. 5: JavaScript An Object-Based Language Ch. 6: Programming the Browser Review Data Types & Variables Data Types Numeric String Boolean Variables Declaring
More informationJavaScript. History. Adding JavaScript to a page. CS144: Web Applications
JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary
More informationGame Scripting. Overview. Scripting Concepts. Script Interpreters ( Engines ) Scripting Languages
Dr. Computer Science Dept. CSUS Overview Scripting Concepts Script Interpreters ( Engines ) Scripting Languages o JavaScript Basics Communicating with Scripts Using Scripts in Games Additional Scripting
More informationUniversity Convocation IT 3203 Introduction to Web Development Creating Objects Accessing Property Values
IT 3203 Introduction to Web Development JavaScript II Labeling Systems October 7 Notice: This session is being recorded. Copyright 2007 by Bob Brown University Convocation Tuesday, October 13, 11:00 12:15
More informationBasics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript
Basics of JavaScript History of the Web XHTML CSS Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static
More informationProduced by. App Development & Modelling. BSc in Applied Computing. Eamonn de Leastar
App Development & Modelling BSc in Applied Computing Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie
More informationJavaScript CS 4640 Programming Languages for Web Applications
JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation
More informationCOMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts
COMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool
More informationJavaScript CS 4640 Programming Languages for Web Applications
JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation
More informationJavaScript. History. Adding JavaScript to a page. CS144: Web Applications
JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary
More informationWeb Application Development
Web Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie JavaScript JAVASCRIPT FUNDAMENTALS Agenda
More informationNode.js Training JavaScript. Richard richardrodger.com
Node.js Training JavaScript Richard Rodger @rjrodger richardrodger.com richard.rodger@nearform.com A New Look at JavaScript Embracing JavaScript JavaScript Data Structures JavaScript Functions Functional
More informationPrincess Nourah bint Abdulrahman University. Computer Sciences Department
Princess Nourah bint Abdulrahman University 1 And use http://www.w3schools.com/ JavaScript Objectives Introduction to JavaScript Objects Data Variables Operators Types Functions Events 4 Why Study JavaScript?
More informationDarshan Institute of Engineering & Technology for Diploma Studies Unit 2. 2 Working with JavaScript
2 Working with JavaScript JavaScript concept or What is JavaScript? JavaScript is the programming language of the Web. It is an object-oriented language that allows creation of interactive Web pages. It
More informationJavaScript: Coercion, Functions, Arrays
JavaScript: Coercion, Functions, Arrays Computer Science and Engineering College of Engineering The Ohio State University Lecture 20 Conversion of Primitive Values String Number Boolean numbers 0 "0" false
More informationSEEM4570 System Design and Implementation Lecture 03 JavaScript
SEEM4570 System Design and Implementation Lecture 03 JavaScript JavaScript (JS)! Developed by Netscape! A cross platform script language! Mainly used in web environment! Run programs on browsers (HTML
More informationJavaScript: Objects, Methods, Prototypes
JavaScript: Objects, Methods, Prototypes Computer Science and Engineering College of Engineering The Ohio State University Lecture 22 What is an Object? Property: a key/value pair (aka "name"/value) Object:
More informationCSS The web browser uses its own resources, and eases the burden on the server. It has fewer features than server side scripting.
What is JavaScript? HTML and CSS concentrate on a static rendering of a page; things do not change on the page over time, or because of events. To do these things, we use scripting languages, which allow
More informationUNIT -II. Language-History and Versions Introduction JavaScript in Perspective-
UNIT -II Style Sheets: CSS-Introduction to Cascading Style Sheets-Features- Core Syntax-Style Sheets and HTML Style Rle Cascading and Inheritance-Text Properties-Box Model Normal Flow Box Layout- Beyond
More informationChapter 3 Data Types and Variables
Chapter 3 Data Types and Variables Adapted from JavaScript: The Complete Reference 2 nd Edition by Thomas Powell & Fritz Schneider 2004 Thomas Powell, Fritz Schneider, McGraw-Hill Jargon Review Variable
More informationJavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects
JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally
More informationIntroduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.
Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content
More informationMore on JavaScript Functions
More on JavaScript Functions Nesting Function Definitions Function definitions can be nested. function hypotenuse(a, b) function square(x) return x * x; return Math.sqrt(square(a) + square(b));
More informationKotlin for Android developers
ROME - APRIL 13/14 2018 Kotlin for Android developers Victor Kropp, JetBrains @kropp Kotlin on JVM + Android JS In development: Kotlin/Native ios/macos/windows/linux Links Kotlin https://kotlinlang.org
More informationCOMP519 Web Programming Lecture 14: JavaScript (Part 5) Handouts
COMP519 Web Programming Lecture 14: JavaScript (Part 5) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool
More informationa Why JavaScript? jonkv interactivity on the web CGI JavaScript Java Applets Netscape LiveScript JavaScript 1: Example
Why JavaScript? 2 JavaScript JavaScript the language Web page manipulation with JavaScript and the DOM 1994 1995: Wanted interactivity on the web Server side interactivity: CGI Common Gateway Interface
More informationProgramming II (CS300)
1 Programming II (CS300) Chapter 02: Using Objects MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Using Objects 2 Introduction to Object Oriented Programming Paradigm Objects and References Memory Management
More informationJavaScript Introduction
JavaScript Introduction Web Technologies I. Zsolt Tóth University of Miskolc 2016 Zsolt Tóth (UM) JavaScript Introduction 2016 1 / 31 Introduction Table of Contents 1 Introduction 2 Syntax Variables Control
More informationThe JavaScript Language
The JavaScript Language INTRODUCTION, CORE JAVASCRIPT Laura Farinetti - DAUIN What and why JavaScript? JavaScript is a lightweight, interpreted programming language with object-oriented capabilities primarily
More informationCOMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)
COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017) RAMANA ISUKAPALLI RAMANA@CS.COLUMBIA.EDU 1 LECTURE-1 Course overview See http://www.cs.columbia.edu/~ramana Overview of HTML Formatting, headings,
More informationThe JavaScript Language
The JavaScript Language INTRODUCTION, CORE JAVASCRIPT Laura Farinetti - DAUIN What and why JavaScript? JavaScript is a lightweight, interpreted programming language with object-oriented capabilities primarily
More informationJavaScript Basics. Mendel Rosenblum. CS142 Lecture Notes - JavaScript Basics
JavaScript Basics Mendel Rosenblum 1 What is JavaScript? From Wikipedia:... high-level, dynamic, untyped, and interpreted programming language... is prototype-based with first-class functions,... supporting
More informationObject Oriented Programming
Object Oriented Programming Objectives To review the concepts and terminology of object-oriented programming To discuss some features of objectoriented design 1-2 Review: Objects In Java and other Object-Oriented
More informationJavaScript: Sort of a Big Deal,
: Sort of a Big Deal, But Sort of Quirky... March 20, 2017 Lisp in C s Clothing (Crockford, 2001) Dynamically Typed: no static type annotations or type checks. C-Like Syntax: curly-braces, for, semicolons,
More informationJavaScript. The Basics
JavaScript The Basics Introduction JavaScript is a scripting language most often used for client-side web development. JavaScript is an implementation of the ECMAScript standard. The ECMAScript only defines
More informationObject Oriented Programming
Object Oriented Programming Objectives To review the concepts and terminology of object-oriented programming To discuss some features of objectoriented design 1-2 Review: Objects In Java and other Object-Oriented
More informationString. Other languages that implement strings as character arrays
1. length() 2. tostring() 3. charat() 4. getchars() 5. getbytes() 6. tochararray() 7. equals() 8. equalsignorecase() 9. regionmatches() 10. startswith() 11. endswith() 12. compareto() 13. indexof() 14.
More informationJavaScript for C# Programmers Kevin
JavaScript for C# Programmers Kevin Jones kevin@rocksolidknowledge.com @kevinrjones http://www.github.com/kevinrjones Agenda Types Basic Syntax Objects Functions 2 Basics 'C' like language braces brackets
More informationLab 14 & 15: String Handling
Lab 14 & 15: String Handling Prof. Navrati Saxena TA: Rochak Sachan String Handling 9/11/2012 22 String Handling Java implements strings as objects of type String. Once a String object has been created,
More informationProduced by. Agile Software Development. Eamonn de Leastar
Agile Software Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie Xtend Programming
More informationJavaScript Functions, Objects and Array
JavaScript Functions, Objects and Array Defining a Function A definition starts with the word function. A name follows that must start with a letter or underscore, followed by any number of letters, digits,
More information710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8
INDEX Symbols = (assignment operator), 56 \ (backslash), 33 \b (backspace), 33 \" (double quotation mark), 32 \e (escape), 33 \f (form feed), 33
More informationInstructor s Notes Web Programming JavaScript Functions. Web Programming JavaScript Functions
Web Programming 152-150 JavaScript Functions Quick Links & Text References Why Use Functions? Pages 210, 212 Two Kinds of Functions Pages 212-217 Function Parameter List Pages 212 Optional Parameters Pages
More informationCS 251 Intermediate Programming Methods and Classes
CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationCS 251 Intermediate Programming Methods and More
CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with
More informationTypeScript. Types. CS144: Web Applications
TypeScript Superset of JavaScript (a.k.a. JavaScript++) to make it easier to program for largescale JavaScript projects New features: types, interfaces, decorators,... All additional TypeScript features
More informationAdministration. Objects and Arrays. Objects. Agenda. What is an Object? What is a Class?
Administration Objects and Arrays CS 99 Summer 2000 Michael Clarkson Lecture 6 Read clarified grading policies Lab 6 due tomorrow Submit.java files in a folder named Lab6 Lab 7 Posted today Upson Lab closed
More informationSymbols. accessor properties, attributes, creating, adding properties, 8 anonymous functions, 20, 80
Index Symbols { } (braces) for function contents, 18 and object properties, 9 == (double equals operator), 5 === (triple equals operator), 5 [ ] (square brackets) for array literals, 10 for property access,
More information15.1 Origins and Uses of Ruby
15.1 Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in 1996 - Use spread rapidly in Japan - Use is now growing in part because of its use in Rails - A pure object-oriented purely interpreted
More informationSo, if you receive data from a server, in JSON format, you can use it like any other JavaScript object.
What is JSON? JSON stands for JavaScript Object Notation JSON is a lightweight data-interchange format JSON is "self-describing" and easy to understand JSON is language independent * JSON uses JavaScript
More informationXtend Programming Language
Xtend Programming Language Produced by: Eamonn de Leastar (edeleastar@wit.ie) Department of Computing and Mathematics http://www.wit.ie/ Agenda Subtitle Excellent Xtend User Guide (Version 2.6) API Docs
More informationCSc 337 LECTURE 5: GRID LAYOUT AND JAVASCRIPT
CSc 337 LECTURE 5: GRID LAYOUT AND JAVASCRIPT Layouts Flexbox - designed for one-dimensional layouts Grid - designed for two-dimensional layouts Grid Layout Use if you want rows and columns Works similarly
More informationJavascript Methods. concat Method (Array) concat Method (String) charat Method (String)
charat Method (String) The charat method returns a character value equal to the character at the specified index. The first character in a string is at index 0, the second is at index 1, and so forth.
More informationCSCE 120: Learning To Code
CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also
More informationJavaScript. IT Engineering I Instructor: Ali B. Hashemi
JavaScript IT Engineering I Instructor: Ali B. Hashemi ١ ١ Why JavaScript? HTML s role on the Web Purpose tell the browser how a document should appear Static fixed view (no interaction) JavaScript s role
More informationJavaScript. Why JavaScript? Dynamic Form Validation. Online calculator. IT Engineering I Instructor: Ali B. Hashemi. Interaction
JavaScript Why JavaScript? HTML s role on the Web Purpose tell the browser how a document should appear Static fixed view (no interaction) IT Engineering I Instructor: Ali B. Hashemi JavaScript s role
More informationCMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.
CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object
More informationLECTURE-2. Functions review HTML Forms. Arrays Exceptions Events. CS3101: Scripting Languages: Javascript Ramana Isukapalli
LECTURE-2 Functions review HTML Forms Arrays Exceptions Events 1 JAVASCRIPT FUNCTIONS, REVIEW Syntax function (params) { // code Note: Parameters do NOT have variable type. 1. Recall: Function
More informationCS1520 Recitation Week 2
CS1520 Recitation Week 2 Javascript http://cs.pitt.edu/~jlee/teaching/cs1520 Jeongmin Lee, (jlee@cs.pitt.edu) Today - Review of Syntax - Embed code - Syntax - Declare variable - Numeric, String, Datetime
More informationCS 2340 Objects and Design - Scala
CS 2340 Objects and Design - Scala Objects and Operators Christopher Simpkins chris.simpkins@gatech.edu Chris Simpkins (Georgia Tech) CS 2340 Objects and Design - Scala Objects and Operators 1 / 13 Classes
More informationJavaScript or: How I Learned to Stop Worrying and Love a Classless Loosely Typed Language
JavaScript or: How I Learned to Stop Worrying and Love a Classless Loosely Typed Language Part 1 JavaScript the language What is JavaScript? Why do people hate JavaScript? / Should *you* hate JavaScript?
More informationJScript Reference. Contents
JScript Reference Contents Exploring the JScript Language JScript Example Altium Designer and Borland Delphi Run Time Libraries Server Processes JScript Source Files PRJSCR, JS and DFM files About JScript
More informationThey grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list.
Arrays Perl arrays store lists of scalar values, which may be of different types. They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. A list literal
More informationRuby: Introduction, Basics
Ruby: Introduction, Basics Computer Science and Engineering College of Engineering The Ohio State University Lecture 3 Ruby vs Java: Similarities Imperative and object-oriented Classes and instances (ie
More informationWeb Engineering (Lecture 06) JavaScript part 2
Web Engineering (Lecture 06) JavaScript part 2 By: Mr. Sadiq Shah Lecturer (CS) Class BS(IT)-6 th semester JavaScript Events HTML events are "things" that happen to HTML elements. javascript lets you execute
More informationJavaScript Basics. The Big Picture
JavaScript Basics At this point, you should have reached a certain comfort level with typing and running JavaScript code assuming, of course, that someone has already written it for you This handout aims
More informationCS1150 Principles of Computer Science Objects and Classes
CS1150 Principles of Computer Science Objects and Classes Yanyan Zhuang Department of Computer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Colorado Springs Object-Oriented Thinking Chapters 1-8
More informationJavaScript Syntax. Web Authoring and Design. Benjamin Kenwright
JavaScript Syntax Web Authoring and Design Benjamin Kenwright Milestone Dates Demonstrate Coursework 1 Friday (15 th December) 10 Minutes Each Coursework 2 (Group Project) Website (XMAS) Javascript Game
More information5/23/2015. Core Java Syllabus. VikRam ShaRma
5/23/2015 Core Java Syllabus VikRam ShaRma Basic Concepts of Core Java 1 Introduction to Java 1.1 Need of java i.e. History 1.2 What is java? 1.3 Java Buzzwords 1.4 JDK JRE JVM JIT - Java Compiler 1.5
More informationChapter 4 Basics of JavaScript
Chapter 4 Basics of JavaScript JavaScript/EcmaScript References The official EcmaScript, third edition, specification http://www.ecma-international.org/publications/files/ecma-st/ecma-262.pdf A working
More informationJAVASCRIPT - OBJECTS OVERVIEW
JAVASCRIPT - OBJECTS OVERVIEW http://www.tutorialspoint.com/javascript/javascript_objects.htm Copyright tutorialspoint.com JavaScript is an Object Oriented Programming OOP language. A programming language
More informationCOMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts
COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool
More informationLecture 8 (7.5?): Javascript
Lecture 8 (7.5?): Javascript Dynamic web interfaces forms are a limited interface
More informationWINTER. Web Development. Template. PHP Variables and Constants. Lecture
WINTER Template Web Development PHP Variables and Constants Lecture-3 Lecture Content What is Variable? Naming Convention & Scope PHP $ and $$ Variables PHP Constants Constant Definition Magic Constants
More informationOutcomes Week 2 Overview Describe the inputs, activities, and outputs of each step in the software development life cycle. Describe arithmetic, relati
ITEC 136 Business Programming Concepts Week 02, Part 01 Overview 1 Week 2 Overview Week 1 review HTML documents Document Type Definition Elements (tags) Attributes Entities Inline and external JavaScript
More informationJAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)
Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 2 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA
More informationAbout the Tutorial. Audience. Prerequisites. Copyright and Disclaimer
About the Tutorial JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java. JavaScript is
More informationProduced by. Agile Software Development. Eamonn de Leastar
Agile Software Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie Xtend Programming
More informationArrays Structured data Arrays What is an array?
The contents of this Supporting Material document have been prepared from the Eight units of study texts for the course M150: Date, Computing and Information, produced by The Open University, UK. Copyright
More informationLecture 7 Objects and Classes
Lecture 7 Objects and Classes An Introduction to Data Abstraction MIT AITI June 13th, 2005 1 What do we know so far? Primitives: int, double, boolean, String* Variables: Stores values of one type. Arrays:
More informationLesson 9: Custom JavaScript Objects
Lesson 9: Custom JavaScript Objects Objectives Create a custom JavaScript object Define properties and methods of custom objects Create new object instances Create client-side arrays using custom objects
More informationIntroduction to JSON. Roger Lacroix MQ Technical Conference v
Introduction to JSON Roger Lacroix roger.lacroix@capitalware.com http://www.capitalware.com What is JSON? JSON: JavaScript Object Notation. JSON is a simple, text-based way to store and transmit structured
More informationWeb Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh
Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style
More informationJavaScript or: HOW I LEARNED TO STOP WORRYING AND LOVE A CLASSLESS*
JavaScript or: HOW I LEARNED TO STOP WORRYING AND LOVE A CLASSLESS* LOOSELY TYPED LANGUAGE Two parts Part 1 JavaScript the language Part 2 What is it good for? Part 1 JavaScript the language What is JavaScript?
More informationThe Number object. to set specific number types (like integer, short, In JavaScript all numbers are 64bit floating point
Internet t Software Technologies JavaScript part three IMCNE A.A. 2008/09 Gabriele Cecchetti The Number object The JavaScript Number object does not allow you to set specific number types (like integer,
More information3 The Building Blocks: Data Types, Literals, and Variables
chapter 3 The Building Blocks: Data Types, Literals, and Variables 3.1 Data Types A program can do many things, including calculations, sorting names, preparing phone lists, displaying images, validating
More information3.1 Class Declaration
Chapter 3 Classes and Objects OBJECTIVES To be able to declare classes To understand object references To understand the mechanism of parameter passing To be able to use static member and instance member
More information1. Introduction. 2. Scalar Data
1. Introduction What Does Perl Stand For? Why Did Larry Create Perl? Why Didn t Larry Just Use Some Other Language? Is Perl Easy or Hard? How Did Perl Get to Be So Popular? What s Happening with Perl Now?
More informationInheritance. Transitivity
Inheritance Classes can be organized in a hierarchical structure based on the concept of inheritance Inheritance The property that instances of a sub-class can access both data and behavior associated
More informationIntroduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.
Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations
More information