SlideShare une entreprise Scribd logo
1  sur  13
JavaScript 101
André Odendaal
Background
Netscape Navigator
Designed by Brendon Eich in 1995
Built to replace Java for the web and be “easy to use”
Principles from Java (syntax), Self (prototypes) & Scheme (functional)
Rushed to market with good, bad & questionable design choices
Microsoft created Jscript, a compatible dialect to avoid trademark issues

ECMA
Standardized by ECMA (European Computer Manufacturers Association)
Called ECMAScript between Netscape & Microsoft
Latest version 5 includes “strict mode” for more thorough error checking
Basic Types
number
Only 64-bit floating point
No integers, longs, doubles, signed or unsigned to complicate matters
Associative Law does not hold for some values
(a + b) + c === a + (b + c)

string
0 or more 16-bit Unicode (UCS-2) characters. No character type

boolean
true & false
Objects
Object Literals
Dynamic (not based on pre-defined class) collection of properties
Property names must be a unique string within the object

Basic Operations – Get, Set & Delete
object.name | object[name]
object.name = value | object[name] = value
delete object.name | delete object[name]

Property
Named collection of attributes
ES5 added functionality to define properties and added Get, Set functions
Attributes: value, writable, configurable, enumerable, get, set
Demo – Objects
Object Types
Arrays
Special object with index as property names (not associative)
Has properties like: length, sort(), filter()

RegEx
Regular expression object
2 primary methods exec() returns a match and test() returns boolean

Functions
An object which can be invoked with parentheses ()
Demo – Objects
Revisited
Other Types
null
Nothing

undefined
Less than nothing
Functions
Composition
Made up of 4 parts: function, name (optional), parameters, set of statements
2 additional parameters: arguments object & this (invocation context)

Invocation
Method – this is the local object
Function – this is the global object
Apply – this is passed as a parameter
Constructor – this is the new object

Calling
Assigning less parameters will make them undefined
Demo – Invoking Functions
Inheritance with Prototypes
Prototype with functions
All functions have a property prototype as a base object
Use new keyword with function invocation to create new objects
Constructor functions should start with a capital letter

Inheritance
If object doesn’t have a property look in base object
Demo - Prototyping
Questions?

Contenu connexe

Tendances

Java 101 Intro to Java Programming - Exercises
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercisesagorolabs
 
Property based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesProperty based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesDebasish Ghosh
 
Namespace in C++ Programming Language
Namespace in C++ Programming LanguageNamespace in C++ Programming Language
Namespace in C++ Programming LanguageHimanshu Choudhary
 
Programming Languages: some news for the last N years
Programming Languages: some news for the last N yearsProgramming Languages: some news for the last N years
Programming Languages: some news for the last N yearsRuslan Shevchenko
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scalapramode_ce
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scalafanf42
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)mircodotta
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the futureAnsviaLab
 
Front end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreFront end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreWeb Zhao
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closuresKnoldus Inc.
 
Constructor and destructor in c++
Constructor and destructor in c++Constructor and destructor in c++
Constructor and destructor in c++Learn By Watch
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design PatternsStefano Fago
 
Xml processing in scala
Xml processing in scalaXml processing in scala
Xml processing in scalaKnoldus Inc.
 
C++ unit-1-part-6
C++ unit-1-part-6C++ unit-1-part-6
C++ unit-1-part-6Jadavsejal
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programmingAssaf Gannon
 

Tendances (20)

Java 101 Intro to Java Programming - Exercises
Java 101   Intro to Java Programming - ExercisesJava 101   Intro to Java Programming - Exercises
Java 101 Intro to Java Programming - Exercises
 
Property based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rulesProperty based Testing - generative data & executable domain rules
Property based Testing - generative data & executable domain rules
 
Namespace in C++ Programming Language
Namespace in C++ Programming LanguageNamespace in C++ Programming Language
Namespace in C++ Programming Language
 
Programming Languages: some news for the last N years
Programming Languages: some news for the last N yearsProgramming Languages: some news for the last N years
Programming Languages: some news for the last N years
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Quick introduction to scala
Quick introduction to scalaQuick introduction to scala
Quick introduction to scala
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scala
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the future
 
Front end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript coreFront end fundamentals session 1: javascript core
Front end fundamentals session 1: javascript core
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
 
Constructor and destructor in c++
Constructor and destructor in c++Constructor and destructor in c++
Constructor and destructor in c++
 
Create and analyse programs
Create and analyse programsCreate and analyse programs
Create and analyse programs
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design Patterns
 
Simplicitly
SimplicitlySimplicitly
Simplicitly
 
Preparing for Scala 3
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3
 
Xml processing in scala
Xml processing in scalaXml processing in scala
Xml processing in scala
 
C++ unit-1-part-6
C++ unit-1-part-6C++ unit-1-part-6
C++ unit-1-part-6
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 

En vedette

EclipseCon 2011-Gemini Naming
EclipseCon 2011-Gemini NamingEclipseCon 2011-Gemini Naming
EclipseCon 2011-Gemini NamingShaun Smith
 
Sunum net weaver pi (fonksiyonel) tr
Sunum net weaver pi (fonksiyonel) trSunum net weaver pi (fonksiyonel) tr
Sunum net weaver pi (fonksiyonel) trFIT Solutions
 
Bottled Water: Bad to the Last Drop
Bottled Water: Bad to the Last DropBottled Water: Bad to the Last Drop
Bottled Water: Bad to the Last Dropmichaeljm007
 

En vedette (6)

EclipseCon 2011-Gemini Naming
EclipseCon 2011-Gemini NamingEclipseCon 2011-Gemini Naming
EclipseCon 2011-Gemini Naming
 
Anonymous functions in JavaScript
Anonymous functions in JavaScriptAnonymous functions in JavaScript
Anonymous functions in JavaScript
 
Sunum net weaver pi (fonksiyonel) tr
Sunum net weaver pi (fonksiyonel) trSunum net weaver pi (fonksiyonel) tr
Sunum net weaver pi (fonksiyonel) tr
 
Value Proposition for OBCs
Value Proposition for OBCsValue Proposition for OBCs
Value Proposition for OBCs
 
Java script
Java scriptJava script
Java script
 
Bottled Water: Bad to the Last Drop
Bottled Water: Bad to the Last DropBottled Water: Bad to the Last Drop
Bottled Water: Bad to the Last Drop
 

Similaire à JavaScript 101: An Introduction to the Basics

Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script PatternsAllan Huang
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Julie Lerman
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET WorldESUG
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHPvinaikopp
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)Eduard Tomàs
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016Codemotion
 
JavaScript (without DOM)
JavaScript (without DOM)JavaScript (without DOM)
JavaScript (without DOM)Piyush Katariya
 
DF15 - Dynamic Apex Binding with design patterns
DF15 - Dynamic Apex Binding with design patternsDF15 - Dynamic Apex Binding with design patterns
DF15 - Dynamic Apex Binding with design patternsFronde Systems Group
 
Functional Programming with JavaScript
Functional Programming with JavaScriptFunctional Programming with JavaScript
Functional Programming with JavaScriptMark Shelton
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaMatteo Baglini
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The EnterpriseDaniel Egan
 
Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Nilesh Jayanandana
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1mohamedsamyali
 

Similaire à JavaScript 101: An Introduction to the Basics (20)

Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
 
Java scriptforjavadev part2a
Java scriptforjavadev part2aJava scriptforjavadev part2a
Java scriptforjavadev part2a
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 
Smalltalk in a .NET World
Smalltalk in a  .NET WorldSmalltalk in a  .NET World
Smalltalk in a .NET World
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
Oop java
Oop javaOop java
Oop java
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHP
 
JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)JavaScript in 2016 (Codemotion Rome)
JavaScript in 2016 (Codemotion Rome)
 
JavaScript in 2016
JavaScript in 2016JavaScript in 2016
JavaScript in 2016
 
JavaScript (without DOM)
JavaScript (without DOM)JavaScript (without DOM)
JavaScript (without DOM)
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
DF15 - Dynamic Apex Binding with design patterns
DF15 - Dynamic Apex Binding with design patternsDF15 - Dynamic Apex Binding with design patterns
DF15 - Dynamic Apex Binding with design patterns
 
Functional Programming with JavaScript
Functional Programming with JavaScriptFunctional Programming with JavaScript
Functional Programming with JavaScript
 
Modern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscanaModern JavaScript Development @ DotNetToscana
Modern JavaScript Development @ DotNetToscana
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The Enterprise
 
Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1
 

Plus de Andre Odendaal

Convolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing GameConvolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing GameAndre Odendaal
 
State of game development
State of game developmentState of game development
State of game developmentAndre Odendaal
 
Prototyping with Text Adventures and MUDs
Prototyping with Text Adventures and MUDsPrototyping with Text Adventures and MUDs
Prototyping with Text Adventures and MUDsAndre Odendaal
 
Create a worthwhile internship programme
Create a worthwhile internship programmeCreate a worthwhile internship programme
Create a worthwhile internship programmeAndre Odendaal
 
Machine Learning & Unity
Machine Learning & UnityMachine Learning & Unity
Machine Learning & UnityAndre Odendaal
 
Narrative without fluff
Narrative without fluffNarrative without fluff
Narrative without fluffAndre Odendaal
 
Comparing the scrum definition to its practice
Comparing the scrum definition to its practiceComparing the scrum definition to its practice
Comparing the scrum definition to its practiceAndre Odendaal
 
Overview of System Virtualization
Overview of System VirtualizationOverview of System Virtualization
Overview of System VirtualizationAndre Odendaal
 
Text adventures & muds
Text adventures & mudsText adventures & muds
Text adventures & mudsAndre Odendaal
 
Why you should make board games?
Why you should make board games?Why you should make board games?
Why you should make board games?Andre Odendaal
 

Plus de Andre Odendaal (12)

Preparing Your CV
Preparing Your CVPreparing Your CV
Preparing Your CV
 
Convolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing GameConvolutional Neural Networks plays Racing Game
Convolutional Neural Networks plays Racing Game
 
State of game development
State of game developmentState of game development
State of game development
 
Roguelike Theory
Roguelike TheoryRoguelike Theory
Roguelike Theory
 
Prototyping with Text Adventures and MUDs
Prototyping with Text Adventures and MUDsPrototyping with Text Adventures and MUDs
Prototyping with Text Adventures and MUDs
 
Create a worthwhile internship programme
Create a worthwhile internship programmeCreate a worthwhile internship programme
Create a worthwhile internship programme
 
Machine Learning & Unity
Machine Learning & UnityMachine Learning & Unity
Machine Learning & Unity
 
Narrative without fluff
Narrative without fluffNarrative without fluff
Narrative without fluff
 
Comparing the scrum definition to its practice
Comparing the scrum definition to its practiceComparing the scrum definition to its practice
Comparing the scrum definition to its practice
 
Overview of System Virtualization
Overview of System VirtualizationOverview of System Virtualization
Overview of System Virtualization
 
Text adventures & muds
Text adventures & mudsText adventures & muds
Text adventures & muds
 
Why you should make board games?
Why you should make board games?Why you should make board games?
Why you should make board games?
 

Dernier

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Dernier (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

JavaScript 101: An Introduction to the Basics

  • 2. Background Netscape Navigator Designed by Brendon Eich in 1995 Built to replace Java for the web and be “easy to use” Principles from Java (syntax), Self (prototypes) & Scheme (functional) Rushed to market with good, bad & questionable design choices Microsoft created Jscript, a compatible dialect to avoid trademark issues ECMA Standardized by ECMA (European Computer Manufacturers Association) Called ECMAScript between Netscape & Microsoft Latest version 5 includes “strict mode” for more thorough error checking
  • 3. Basic Types number Only 64-bit floating point No integers, longs, doubles, signed or unsigned to complicate matters Associative Law does not hold for some values (a + b) + c === a + (b + c) string 0 or more 16-bit Unicode (UCS-2) characters. No character type boolean true & false
  • 4. Objects Object Literals Dynamic (not based on pre-defined class) collection of properties Property names must be a unique string within the object Basic Operations – Get, Set & Delete object.name | object[name] object.name = value | object[name] = value delete object.name | delete object[name] Property Named collection of attributes ES5 added functionality to define properties and added Get, Set functions Attributes: value, writable, configurable, enumerable, get, set
  • 6. Object Types Arrays Special object with index as property names (not associative) Has properties like: length, sort(), filter() RegEx Regular expression object 2 primary methods exec() returns a match and test() returns boolean Functions An object which can be invoked with parentheses ()
  • 9. Functions Composition Made up of 4 parts: function, name (optional), parameters, set of statements 2 additional parameters: arguments object & this (invocation context) Invocation Method – this is the local object Function – this is the global object Apply – this is passed as a parameter Constructor – this is the new object Calling Assigning less parameters will make them undefined
  • 10. Demo – Invoking Functions
  • 11. Inheritance with Prototypes Prototype with functions All functions have a property prototype as a base object Use new keyword with function invocation to create new objects Constructor functions should start with a capital letter Inheritance If object doesn’t have a property look in base object

Notes de l'éditeur

  1. Value defaults to undefinedWritable defaults to falseConfigurable defaults to falseEnumerable defaults to falseGet defaults to undefinedSet defaults to undefined
  2. Method: local objectFunction: global object // mistake, should be outer function this objectthat work-aroundConstructor: new objectApply: choose, list of parameters