JavaScript: Objects and Functions - GitHub Pages
JavaScript: Objects and Functions
"The" language of the Web
Fulvio Corno Luigi De Russis Enrico Masala
Applicazioni Web I - Web Applications I - 2021/2022
Outline
? Objects ? Functions
? Closures
? Dates
2
Applicazioni Web I - Web Applications I - 2021/2022
JavaScript ? The language of the Web
OBJECTS
JavaScript: The Definitive Guide, 7th Edition Chapter 5. Objects
Mozilla Developer Network
? Learn web development JavaScript ? Dynamic client-side scripting ? Introducing JavaScript objects
? Web technology for developers ? JavaScript ? JavaScript reference ? Standard built-in objects ? Object
? Web technology for developers ? JavaScript ? JavaScript reference ? Expressions and operators ? in operator
3
Applicazioni Web I - Web Applications I - 2021/2022
Big Warnings (a.k.a., forget Java objects)
? In JavaScript, Objects may exist without Classes
? Usually, Objects are created directly, without deriving them from a Class definition
? In JavaScript, Objects are dynamic
? You may add, delete, redefine a property at any time ? You may add, delete, redefine a method at any time
? In JavaScript, there are no access control methods
? Every property and every method is always public (private/protected don't exist)
? There is no real difference between properties and methods (because of how JS functions work)
4
Applicazioni Web I - Web Applications I - 2021/2022
Object
? An object is an unordered collection of properties
? Each property has a name (key), and a value
? You store and retrieve property values, through the property names ? Object creation and initialization:
let point = { x: 2, y: 5 };
let book = {
author : "Enrico",
Object literals syntax:
title : "Learning JS", {"name": value,
for: "students",
"name": value, }
pages: 520,
or:
};
{name: value,
name: value, }
5
Applicazioni Web I - Web Applications I - 2021/2022
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- object and maplike world wide web consortium w3c
- jsquery sternberg astronomical institute
- core javascript reference card jmu
- simplifying javascript the pragmatic programmer
- putting together html css with javascript columbia university
- c s e 1 5 4 w e b p r o g r a mmi n g n o d e j s e x p r e s s
- javascript objects and functions github pages
- security developer s guide oracle
- zoiper web api
- beginner s essential javascript cheat sheet websitesetup
Related searches
- roles and functions of law
- roles and functions of managers
- the role and functions of law
- role and functions of a financial manager
- purposes and functions of law
- roles and functions of management
- roles and functions definition
- formulas and functions in ms excel
- brain parts and functions chart
- brain anatomy and functions diagram
- brain structures and functions worksheet
- parts and functions of the human brain