From 2a76c37d0e733dedf8ed87d1e7e46caf3c44667e Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Fri, 30 Jul 2021 20:18:17 +0200 Subject: Prepare JS French section for Markdown (#1574) * Rm IDs w/ [^h\d] id=" * Remove class="hidden" * Remove hidden for code blocks * rm summary classes * Use Note consistently * Remove sup * Rm code in pre * Fixes dd/dt/dl * Fix some more dd * Remove inline style and useless/craft from span/font * h2m report fixing - Consistent use of notes * h2m report fixing - Consistent use of warnings * h2m report fixing - reword one callout * h2m report fixing - array cruft spans hell * Cleaning the rest of docs for md conversion --- .../javascript/reference/functions/method_definitions/index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'files/fr/web/javascript/reference/functions/method_definitions') diff --git a/files/fr/web/javascript/reference/functions/method_definitions/index.html b/files/fr/web/javascript/reference/functions/method_definitions/index.html index c8991b325a..13c6fdf0fa 100644 --- a/files/fr/web/javascript/reference/functions/method_definitions/index.html +++ b/files/fr/web/javascript/reference/functions/method_definitions/index.html @@ -17,8 +17,6 @@ original_slug: Web/JavaScript/Reference/Fonctions/Définition_de_méthode
{{EmbedInteractiveExample("pages/js/functions-definitions.html")}}
- -

Syntaxe

var obj = {
@@ -157,7 +155,7 @@ new obj.g; // TypeError: obj.g is not a constructuer (changé avec ES2016)
 
 

Cas de test

-
var obj = {
+
var obj = {
   a : "toto",
   b(){ return this.a; }
 };
@@ -168,7 +166,7 @@ console.log(obj.b()); // "toto"
 
 

Cette notation raccourcie peut également être utilisée avec des noms de propriétés calculés.

-
var bar = {
+
var bar = {
   toto0 : function (){return 0;},
   toto1(){return 1;},
   ["toto" + 2](){return 2;},
-- 
cgit v1.2.3-54-g00ecf