several languages in the same javascript program

Solutions on MaxInterview for several languages in the same javascript program by the best coders in the world

showing results for - "several languages in the same javascript program"
Federica
31 Jul 2018
1// Language (0: Spanish 1: English):
2language = 0;
3
4let m;
5spanish = {
6    intro: "Hola! Bienvenido a Tres en Ralla (Tic Tac Toe), para empezar escribe \"start\""
7}
8
9english = {
10    intro: "Hi! Welcome to Tic Tac Toe, to start write below 'start'"
11}
12
13switch (language) {
14    case 0:
15        m = spanish;
16        break;
17    case 1:
18        m = english;
19}
20
21console.log(m.intro)