Answers for "several languages in the same javascript program"

0

several languages in the same javascript program

// Language (0: Spanish 1: English):
language = 0;

let m;
spanish = {
    intro: "Hola! Bienvenido a Tres en Ralla (Tic Tac Toe), para empezar escribe \"start\""
}

english = {
    intro: "Hi! Welcome to Tic Tac Toe, to start write below 'start'"
}

switch (language) {
    case 0:
        m = spanish;
        break;
    case 1:
        m = english;
}

console.log(m.intro)
Posted by: Guest on July-22-2021

Code answers related to "several languages in the same javascript program"

Code answers related to "Javascript"

Browse Popular Code Answers by Language