22. Définir une chaîne de caractères
"When I get sad I stop being sad and be AWESOME instead."
'True story!'
23. Caractère d'échappement
"There is only one god and his name is Death. And
there is only one thing we say to Death: "Not today.""
!
"A bear there was, a bear, a bear!n
All black and brown, and covered with hair!n
The bear! The bear!n
Oh, come, they said, oh come to the fair!n
The fair? Said he, but I'm a bear!n
All black, and brown, and covered with hair!"
!
"hodor hodor hodor"
26. Null & Undefined (1)
Undefined : primitive value used when a variable has not
been assigned a value
Null : primitive value that represents the intentional
absence of any object value
31. Concaténation
"If you're committed enough, you can make any story
work." + " I once told a woman I was Kevin Costner, and
it worked because I believed it." + " - Saul Goodman »;
!
// If you're committed enough, you can make any story
work. I once told a woman I was Kevin Costner, and it
worked because I believed it - Saul Goodman
40. Nommer une variable (1)
Aucun espace
Aucun mots clés réservés : break case catch continue
debugger default delete do else false finally for function if
implements in instanceof interface let new null package
private protected public return static switch throw true
try typeof var void while with yield this
Aucune ponctuation sauf ‘_’ et ‘$’
Ne doit pas commencer par un chiffre
41. Nommer une variable (2)
// Syntax valide
var a;
var b, c;
var s_variable;
var b2;
// Syntax invalide
var 2a;
var a:a;
var function;
42. Affecter une variable
// Affecter une variable
var a = 8, b = "toto", c = true, d;
a = 2;
console.log(a); // 2
console.log(b); // toto
console.log(c); // true
console.log(d); // undefined
45. Bibliographie
Eloquent JavaScript - Marijn Haverbeke
http://eloquentjavascript.net
Dynamisez vos sites web avec Javascript ! - Johann Pardanaud & Sébastien de la Marck
http://fr.openclassrooms.com/informatique/cours/dynamisez-vos-sites-web-avec-javascript
JavaScript Fundamentals - Jeremy McPeak
http://code.tutsplus.com/courses/javascript-fundamentals
Guide JavaScript - teoli, BenoitL, delislejm, Ame_Nomade, SphinxKnight
https://developer.mozilla.org/fr/docs/Web/JavaScript/Guide
Javascript – MAX_INT: Number Limits - Vjeux
http://blog.vjeux.com/2010/javascript/javascript-max_int-number-limits.html
46. Crédits (1)
Lost - Jeffrey Lieber, J. J. Abrams, Damon Lindelof
http://abc.go.com/shows/lost
Person of interest - Jonathan Nolan, David Slack, Patrick Harbinson
http://www.cbs.com/shows/person_of_interest/
Halt and Catch Fire - Christopher Cantwell, Christopher C. Rogers
http://www.amctv.com/shows/halt-and-catch-fire
Utilities terminal Icon - kxmylo
http://www.iconarchive.com/show/simple-icons-by-kxmylo/utilities-terminal-icon.html
Breaking bad - Vince Gilligan
http://www.amctv.com/shows/breaking-bad
House of Cards - Beau Willimon
https://www.facebook.com/HouseofCards
The Big Bang Theory - Chuck Lorre, Bill Prady
http://www.cbs.com/shows/big_bang_theory/
Game of Thrones - David Benioff, D. B. Weiss
http://www.hbo.com/game-of-thrones
47. The Wire - David Simon
http://www.hbo.com/the-wire
Crédits (2)
Silicon Valley - Mike Judge
http://www.hbo.com/silicon-valley
The Killing - Veena Sud
http://www.amctv.com/shows/the-killing
Band of Brothers - Tom Hanks, Steven Spielberg
http://www.hbo.com/band-of-brothers