Introduction to JavaScript academy.zariba.com 1. Lecture Content 1.What is JavaScript? 2.JavaScript Pros and Cons 3.The weird JavaScript stuff 4.Including.

Slides:



Advertisements
Similar presentations
Javascript It’s not JAVA. What do these all have in common?
Advertisements

 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Javascript Client-side scripting. Up to now  We've seen a little about how to control  content with HTML  presentation with CSS  Javascript is a language.
Information Technology Center Hany Abdelwahab Computer Specialist.
JavaScript, Third Edition
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
Introduction to JavaScript for Python Programmers
1.7 Arrays academy.zariba.com 1. Lecture Content 1.Basic Operations with Arrays 2.Console Input & Output of Arrays 3.Iterating Over Arrays 4.List 5.Cloning.
WEB DESIGN AND PROGRAMMING Introduction to Javascript.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
Week 9 PHP Cookies and Session Introduction to JavaScript.
Chap 3 – PHP Quick Start COMP RL Professor Mattos.
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Chapter 3: Data Types and Operators JavaScript - Introductory.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
CHAPTER 4 Java Script อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Java ProgrammingtMyn1 Java Programming Timo Mynttinen Mikkeli University of Applied Sciences.
Using Client-Side Scripts to Enhance Web Applications 1.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
Phaser Basics academy.zariba.com 1. Lecture Content 1.What is Phaser? 2.Why Phaser? 3.Phaser Pros and Cons 4.Phaser Resources 5.Sample Template in WebStorm.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Intro to JavaScript Scripting language –ECMAScript compliant –Client side vs. server side Syntactic rules –White space –Statement end: ; optional –Comments:
JavaScript Syntax and Semantics. Slide 2 Lecture Overview Core JavaScript Syntax (I will not review every nuance of the language)
An Introduction to Java – Part 1 Dylan Boltz. What is Java?  An object-oriented programming language  Developed and released by Sun in 1995  Designed.
4.4 JavaScript (JS) Deitel Ch. 7, 8, 9, JavaScript & Java: Similarities JS (JavaScript) is case-sensitive Operators –arithmetic: unary +, unary.
Javascript. What is JavaScript? Scripting (interpreted) language designed for the web Beware: JavaScript is case sensitive.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
1.5 Conditional Statements academy.zariba.com 1. Lecture Content 1.If-else statements 2.If-else-if statements 3.Switch-case statements 2.
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.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
JS Course Program, Evaluation, Exams, Resources Telerik Software Academy JavaScript Fundamentals.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 4 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.
Unit 10-JavaScript Functions Instructor: Brent Presley.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
Chapter 14 JavaScript: Part II The Web Warrior Guide to Web Design Technologies.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Introduction to JavaScript 21 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 15.
Introduction to Javascript. What is javascript?  The most popular web scripting language in the world  Used to produce rich thin client web applications.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
JavaScript Tutorial First lecture 19/2/2016. Javascript is a dynamic computer programming language. It is lightweight and most commonly used as a part.
PHP using MySQL Database for Web Development (part II)
Chapter 6 JavaScript: Introduction to Scripting
JavaScript Syntax and Semantics
JavaScript OOP academy.zariba.com.
Expressions and Control Flow in JavaScript
JavaScript.
JavaScript: Control Statements I
The structure of computer programs
JavaScript and Ajax (Expression and Operators)
JavaScript an introduction.
Web Systems Development (CSC-215)
Modern JavaScript Develop And Design
PHP.
T. Jumana Abu Shmais – AOU - Riyadh
University of Kurdistan
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
JavaScript CS 4640 Programming Languages for Web Applications
PHP an introduction.
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

Introduction to JavaScript academy.zariba.com 1

Lecture Content 1.What is JavaScript? 2.JavaScript Pros and Cons 3.The weird JavaScript stuff 4.Including JavaScript in your project 5.Data Types and Variables 6.Operators and Expressions 7.Conditional Statements 8.Loops 9.Arrays 10.Functions 11.Objects 2

3 What is JavaScript? JavaScript is a front-end* scripting language It is embedded in your HTML page It is interpreted by the browser JavaScript is the most popular programming language in the world

4 JavaScript Pros and Cons Pros: Lightweight Powerful Simple Easy to Learn Lots of Open-Source Libraries Great for UI Cons: Limited functionality Strange behavior Terrible OOP (to be fixed in ES6) Functionality differs through browsers Arrays are not really arrays …

The Weird JavaScript Stuff 5

Including JavaScript in your Project 6

Data Types and Variables 7 JavaScript is a typeless language – the type can be changed Strings can be declared with ‘ or “

Operators and expressions 8 CategoryOperators Arithmetic+ - * / % Logical&& || ^ ! Binary& | ^ ~ > Comparison== != = Assignment= += -= *= /= %= &= |= ^= >= String concatenation+ Type Conversionis as typeof Other. [ ] ( ) ?: new Operators are roughly the same as in C# “/” can yield NaN or +/- Inifinity Comparison should be done with “===“

Conditional Statements 9 If, if-else, if-else-if, switch case statements are all used in the same way as in C# One key difference is that every type has an inherited Boolean value Evaluated to False – false, 0, “”, null, undefined, NaN

Loops 10 While, do-while, for and for-in (sort of like foreach in C#) are used in the same way as in C# For-in iterates over the indices of an array or over the properties of an object For-of is a new statement much like foreach in C#. For-of is not supported by all browsers

Arrays 11 Arrays are almost nothing like in C# They combine the properties and methods of Dictionary, Stack, Queue, Array … etc

Functions 12 Functions are similar to methods in C# Declared by the keyword function There is no function overloading, it can be faked by using optional parameters(typescript) or checking the arguments length

Objects 13 Objects in JavaScript are different from C# You can give an object a set of attributes (properties) and actions (functions) Syntax is similar to anonymous types in C#

14 Homework 1.Rewrite the first 2 tasks from every lecture in the C# part 1 module in JavaScript 2. Make a list of the key differences between JavaScript and C#

15 References

16 Zariba Academy Questions