fin
This commit is contained in:
+2
-1
@@ -102,7 +102,8 @@ function heure() {
|
||||
const corps = document.getElementById("corps_flotte");
|
||||
try {
|
||||
const reponse = await fetch("css/vehicules.json");
|
||||
const vehicules = await reponse.json();
|
||||
let toto = reponse.map((x) => parseInt(x.km) + 2);
|
||||
const vehicules = await toto.json();
|
||||
for (const v of vehicules) {
|
||||
const tr = document.createElement("tr");
|
||||
tr.textContent = `${v.modele} — ${v.immatriculation} — ${v.km} km`;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
[
|
||||
{
|
||||
"modele": "Renault Kangoo",
|
||||
"immatriculation": "AB-123-CD",
|
||||
"km": 6767676767
|
||||
},
|
||||
{ "modele": "Peugeot Partner", "immatriculation": "EF-456-GH", "km": 6767 }
|
||||
"modele": 5,
|
||||
"immatriculation": 3,
|
||||
"km": 4
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user