Course
summary


    0 chapters available

Loading...

Make your website interactive with JavaScript

Difficulty: Beginner ● Progress: 0 / 0 modules completed

Summary

Let's go back to our card game example:

For now, we have stored each player's name in an array as well as their cards in different arrays, as in the code below:

const players = ["Mickael", "Marie", "Mohammed", "Miho"];
const playersCards = [
    ["A♥", "3♣"],	 // Main de Mickael
    ["J♦", "J♠"],  // Main de Marie
    ["5♥", "6♥"],  // Main de Mohammed
    ["10♠", "K♣"]  // Main de Miho
];

You need a free account to read this module