From 4fdbcdf914124ae82d291baf294d3cf3ed835a85 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 14 Jun 2024 10:12:46 +0200 Subject: [PATCH] =?UTF-8?q?4-01=20g=C3=A9n=C3=A9ralisation=20algo=20tri=20?= =?UTF-8?q?(croissant/d=C3=A9croissant)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paheko.side | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paheko.side b/paheko.side index 520d972..2bd85b8 100644 --- a/paheko.side +++ b/paheko.side @@ -6648,7 +6648,7 @@ "id": "6152acac-1ffb-4d42-8c60-3d49c68288ed", "comment": "Trier les membres par numéro croissant", "command": "executeScript", - "target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } tab.sort((a, b) => { return a.numero - b.numero; }); return tab;} return trier(${lesnumeros}, ${lesnoms})", + "target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } ordre = croissant ? 1 : -1; tab.sort((a, b) => { return ordre * (a.numero - b.numero); }); return tab;} return trier(${lesnumeros}, ${lesnoms})", "targets": [], "value": "membres_asc" }, {