From 1421ef08f5aa7de56a413753d9017693d3b44187 Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Wed, 20 Aug 2014 10:12:21 +0200 Subject: Updated the part that I forgot to translate. --- fr-fr/javascript-fr.html.markdown | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'fr-fr/javascript-fr.html.markdown') diff --git a/fr-fr/javascript-fr.html.markdown b/fr-fr/javascript-fr.html.markdown index 1dc4f8db..55f7858c 100644 --- a/fr-fr/javascript-fr.html.markdown +++ b/fr-fr/javascript-fr.html.markdown @@ -37,6 +37,7 @@ doStuff() // Parce que ces cas peuvent produire des effets inattendus, nous utiliserons // des point-virgules dans ce guide. + /////////////////////////////////// // 1. Nombres, Chaines de caractères et Opérateurs @@ -182,6 +183,7 @@ myObj.myThirdKey = true; // Si vous essayez d'accéder à une valeur non-définie, vous obtiendrez undefined myObj.myFourthKey; // = undefined + /////////////////////////////////// // 3. Logique et structures de contrôle @@ -314,6 +316,7 @@ function sayHelloInFiveSeconds(name){ } sayHelloInFiveSeconds('Adam'); // ouvre un popup avec 'Hello, Adam!' dans 5sec + /////////////////////////////////// // 5. Encore plus à propos des Objets; Constructeurs and Prototypes @@ -470,12 +473,12 @@ String.prototype.firstCharacter = function(){ //Par exemple, Object.create est assez récent, mais peut être implémenté grâce à // ce polyfill -if (Object.create === undefined){ // don't overwrite it if it exists +if (Object.create === undefined){ // pour ne pas reécrire si la fonction existe déjà Object.create = function(proto){ - // make a temporary constructor with the right prototype + // créer un constructeur temporaire avec le bon prototype var Constructor = function(){}; Constructor.prototype = proto; - // then use it to create a new, appropriately-prototyped object + // puis on utilise "new" pour créer un object avec ce prototype return new Constructor(); } } -- cgit v1.2.3