JSFiddle - React, Tailwind, and code Playground
GM : piSCRABBLE... partie Mehdi (2/2)... qu'il doit COMPLETER !
by M.V. 414
HTML
<h2>piSCRABBLE : partie Mehdi</h2>
<h3>Tâche 2 (sur 2) : Affichage des mots et annonce des points
(par mots et total)
dans un DIV
</h3>
<div id="div_mots">
</div>
La tâche 1 est la gestion de la pioche dans un autre exemple jsfiddle.
JavaScript
var ListeDesMotsProposes = [{'mot':'AIDE','pts':5},{'mot':'DEFI','pts':4}];
var ListeMots=[];
for (var i = 0; i < ListeDesMotsProposes.length; i++) {
ListeMots.push(i)
console.log(ListeDesMotsProposes[i].mot);
console.log(ListeDesMotsProposes[i].pts);
}
console.log(ListeMots)