SlideShare a Scribd company logo
JavaScript: You Like It, It Likes You
Javascript
You like it, it likes you.
Brief history lesson.
       (I’m sorry)
JavaScript: You Like It, It Likes You
Douglas Crockford
    Every time you forget a semicolon,
he roundhouse kicks your mom in the face.
JavaScript: You Like It, It Likes You
JavaScript: You Like It, It Likes You
Why use JavaScript?
JavaScript: You Like It, It Likes You
JavaScript: You Like It, It Likes You
Variables and data types.
Variables and data types.
Variables and data types.
            hi  s hor seshit
  w tf is t
           FAIL
Variables and data types.
            hi  s hor seshit
  w tf is t
           FAIL
JavaScript: You Like It, It Likes You
Some JavaScript fundamentals.
  Gotta crawl before you make an omelette.
Some JavaScript fundamentals.
     This sumbitch is case-sensitive.
Some JavaScript fundamentals.
                            Comments.




Comment your code so the next slackjawed gutbucket who’s clearly way
 dumber than you that has to work with it isn’t TOTALLY boned, plzkthx.
JavaScript: You Like It, It Likes You
DON’T FUCKING DO THIS.
DON’T FUCKING DO THIS.
     p.s.: yeah. i wrote it. shut up.
Arithmetic Operators
Variables and data types.
Variables and data types.
Variables and data types.
        String theory.
Variables and data types.
   Hey baby what’s your Number.
Variables and data types.
Stupid loose typing. Wait, it gets better.
Variable comparisons.
Variable comparisons.


         x = 4;
        y = “7”;
x.toString(); // “4” (string)
parseInt(y,10); // 7 (number)
Variable comparisons.



          y = “why”;
parseInt(y,10); // NaN (Not a Number)
Variable comparisons.
This is why Douglas Crockford drinks.



      NaN == NaN;
     NaN === NaN;
        // both false.
Variable comparisons.
              This is why Scott Kosman drinks.


Note that +, besides being used for math, also concatenates strings.


 
 
 
 
 var x = 5 + 3; 

 
 
 // 8 - Number

 
 
 
 
 var x = “5” + “3”; 

 // “53” - String


                (PHP got this part right. JavaScript? Meh.)
Variables and data types.
Boolean. That word’s funny enough on it’s own.
Variables and data types.
   Something about Madonna.
      (Array of light? See what I did there?)
Variables and data types.
Object notation (JSON), and yeah I’ll stop now.
Variables and data types.
         Functions.
Variables and data types.
         Functions.
Variables and data types.
         Functions.
Variables and data types.
         Functions.
Variables and data types.
         Functions.
Control structures.
Control structures.
     If statement.
Control structures.
     If statement.
Control structures.
   If/else statement.
Control structures.
 If/else if/else statement.
Control structures.
 If/else if/else statement.
Control structures.
   Switch statement.
Control structures.
   Switch statement.
Control structures.
    Looooooooops.
Control structures.
    Looooooooops.
Let’s write some code!
       Woooooooo!
Helpful resources.
     well it's on and on and on on and on the beat don't stop until the break of dawn




           Douglas Crockford on Javascript in Six Parts
http://developer.yahoo.com/yui/theater/video.php?v=crockonjs-1

                                 Firebug
                        http://www.getfirebug.com

                                    JSLint
                            http://www.jslint.com

More Related Content

PPTX
Analyzing memory usage and leaks
PPT
Sdfljflgkjasdf
PDF
LFC DjangoCon EU
DOCX
รายงานคอม
PDF
Drupal Front End PHP
DOCX
คอม
DOCX
คอม
ODP
Php1(2)
Analyzing memory usage and leaks
Sdfljflgkjasdf
LFC DjangoCon EU
รายงานคอม
Drupal Front End PHP
คอม
คอม
Php1(2)

Similar to JavaScript: You Like It, It Likes You (20)

PDF
03 introduction to graph databases
PPTX
All of Javascript
PDF
Dear JavaScript... - Alessandro Cinelli - Codemotion Amsterdam 2018
PPTX
All of javascript
PPT
Goodparts
PPT
Douglas Crockford Presentation Goodparts
PDF
Types are eating the world
PDF
Glenn Vanderburg — Learning to love JavaScript
PPTX
Dear compiler please don't be my nanny v2
PDF
Google maps
PDF
Javascriptbootcamp
PDF
React JS and why it's awesome
PDF
Section 8 Programming Style and Your Brain: Douglas Crockford
PPTX
Anything But Typical: Learning to Love JavaScript Prototypes
PDF
Real life-coffeescript
PDF
JavaScript: Core Part
KEY
Douglas Crockford - Programming Style and Your Brain
PDF
Developing A Procedural Language For Postgre Sql
PDF
Groovy Metaprogramming for Dummies
PDF
DSLs in JavaScript
03 introduction to graph databases
All of Javascript
Dear JavaScript... - Alessandro Cinelli - Codemotion Amsterdam 2018
All of javascript
Goodparts
Douglas Crockford Presentation Goodparts
Types are eating the world
Glenn Vanderburg — Learning to love JavaScript
Dear compiler please don't be my nanny v2
Google maps
Javascriptbootcamp
React JS and why it's awesome
Section 8 Programming Style and Your Brain: Douglas Crockford
Anything But Typical: Learning to Love JavaScript Prototypes
Real life-coffeescript
JavaScript: Core Part
Douglas Crockford - Programming Style and Your Brain
Developing A Procedural Language For Postgre Sql
Groovy Metaprogramming for Dummies
DSLs in JavaScript
Ad

Recently uploaded (20)

PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
A Presentation on Artificial Intelligence
PPTX
Cloud computing and distributed systems.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
cuic standard and advanced reporting.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
A Presentation on Artificial Intelligence
Cloud computing and distributed systems.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
cuic standard and advanced reporting.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine learning based COVID-19 study performance prediction
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Ad

JavaScript: You Like It, It Likes You

Editor's Notes