“Under the hood”: Angry Birds Maze

Slides:



Advertisements
Similar presentations
JavaScript I. JavaScript is an object oriented programming language used to add interactivity to web pages. Different from Java, even though bears some.
Advertisements

Introducing JavaScript
Java Script Session1 INTRODUCTION.
Introduction to JavaScript
1 CSC 551: Web Programming Spring 2004 client-side programming with JavaScript  scripts vs. programs  JavaScript vs. JScript vs. VBScript  common tasks.
The Web Warrior Guide to Web Design Technologies
CS 898N – Advanced World Wide Web Technologies Lecture 14: JavaScript Chin-Chih Chang
MSc. Publishing on WWW JavaScript. What is JavaScript? A scripting language devised by Netscape Adds functionality to web pages by: Embedding code into.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
CS 299 – Web Programming and Design Overview of JavaScript and DOM Instructor: Dr. Fang (Daisy) Tang.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
Chapter 9 Interactive Multimedia Authoring with Flash - Introduction to Programming “Computers and Creativity” Richard D. Webster, COSC 109 Instructor.
Javascript and the Web Whys and Hows of Javascript.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
Generations of Programming Languages First generation  Machine Language Second Generation  Assembly Language Third Generation  Procedural language such.
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
What is Java Script? An extension to HTML. An extension to HTML. Allows authors to incorporate some functionality in their web pages. (without using CGI.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 JavaScript in Context. Server-Side Programming.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Tutorial 10 Programming with JavaScript
Introduction to JavaScript Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan. 1.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
JavaScript Syntax, how to use it in a HTML document
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
JavaScript Scripting language What is Scripting ? A scripting language, script language, or extension language is a programming language.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
CIS 3.5 Lecture 2.3 "Introduction to JavaScript".
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Introduction to JavaScript CSc 2320 Fall 2014 Disclaimer: All words, pictures are adopted from “Simple JavaScript”by Kevin Yank and Cameron Adams and also.
1 Lesson 6 Introducing JavaScript HTML and JavaScript BASICS, 4 th Edition.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Module 1 Introduction to JavaScript
Unit 20 - Client Side Customisation of Web Pages
Chapter 10 Programming Fundamentals with JavaScript
“Under the hood”: Angry Birds Maze
Tutorial 10 Programming with JavaScript
JavaScript is a programming language designed for Web pages.
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
JavaScript.
14 A Brief Look at JavaScript and jQuery.
Chapter 10 Programming Fundamentals with JavaScript
WEB PROGRAMMING JavaScript.
PHP.
T. Jumana Abu Shmais – AOU - Riyadh
JavaScript What is JavaScript? What can JavaScript do?
CS105 Introduction to Computer Concepts
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
JavaScript What is JavaScript? What can JavaScript do?
Tutorial 10: Programming with javascript
JavaScript Basics What is JavaScript?
Introducing JavaScript
JavaScript is a scripting language designed for Web pages by Netscape.
Javascript Chapter 19 and 20 5/3/2019.
CIS 136 Building Mobile Apps
Presentation transcript:

“Under the hood”: Angry Birds Maze LESSON 2: Java Script “Under the hood”: Angry Birds Maze

History First web scripting language Developed by Netscape and Sun Initiated by Netscape and called LiveScript In parallel with this, Sun was developing Java

Why Use JavaScript? JavaScript enhances Web pages with dynamic and interactive features.

What can JavaScript Do? JavaScript gives HTML designers a programming tool JavaScript can react to events Validate data It can be used to detect the visitor’s browser Create cookies Read/write/modify HTML elements

Functions Functions are named statements that performs tasks. e.g., function doWhatever () {statement here} The curly braces contain the statements of the function. JavaScript has built-in functions, and you can write your own.

Values Values are bits of information. Values types and some examples include: Number: 1, 2, 3, etc. String: characters enclosed in quotes. Boolean: true or false. Object: image, form Function: validate, doWhatever

Variables Variables contain values and use the equal sign to specify their value. Variables are created by declaration using the var command with or without an initial value state. e.g., var month; e.g., var month = April;

JavaScript terms Binary Code: Compiler: Condition: Interpretation: Machine Readable Code (After JavaScript code has been translated by interpretation, it becomes binary code Compiler: Highly specialized piece of software that takes a programming language that humans can understand and converts it into language computers can understand Condition: A conditional statement tells the browser IF this condition is met, perform this function; if not (ELSE) perform a different function Interpretation: Describes the line-by line conversion process that occurs automatically at run time or when the Web browser launches the JavaScript commands that are embedded in the Web document

Terms (continued) Keywords: Parameter List Programming Language Word recognized by the programming language as part of its language (IF, ELSE, RETURN) Parameter List A list of information that provides a programming method what it needs to perform a specific function correctly. Programming Language A language that has to be converted from a human-readable format into machine-reada ble format. This process is accomplished by using a compiler to complete the operation. Scripting Language Language that does not have to be run through a compiler for it to be understood. Web browsers will take the human-readable format and convert it into machine-readable format “on the fly”.

JavaScript “Under the Hood”

Assignment See directions on Worksheet: Java Script Assignment (2-sided) PART 1 Transcribe, by hand, the JavaScript code “Under the Hood” for puzzles 1 - 10 Number each lesson, then transcribe the code EXACTLY as it appears “Under the Hood” after completing each puzzle Be precise on Indentation and Spacing (see example on Board) For puzzles 11 thru 20 copy and paste the JavasScript (Under the Hood” on a WORD doc (not Google doc), number each lesson (see example)

Example: Transcribing, by hand, Lessons 1 - 10 moveForward(); moveForward(); moveForward(); moveForward(); moveForward(); moveForward(); for (var count = 0; count < 5; count++) { moveForward(); } Example: Transcribing, by hand, Lessons 1 - 10 Puzzle # Code (Under the Hood) Number 1. moveForward (); moveForward (); 5. for (var count = 0; count < 5; count++) { moveForward(); }

Assignment (continued) PART 2 Complete Worksheet: Java Script Assignment (2-sided) Using the Four Functions introduced through video clips in the “Angry Bird Maze” write a brief description of why/when/how each command is used (review video clips if necessary) REPEAT (Puzzle 6) REPEAT UNTIL (Puzzle 10) IF (Puzzle 14) IF/ELSE (Puzzle 18)