Answer the question
In order to leave comments, you need to log in
alert doesn't work, why?
Hello. I'm learning JS. The question is, why doesn't the alert work? Even if an arbitrary message is written, the script does not reach alert, something is wrong in the array.
var lang = 'ru';
var day = 1;
var arr = {'ru': [1:'Пн', 2:'Вт', 3:'Ср', 4:'Чт', 5:'Пт', 6:'Сб', 7:'Вс'],
'en': [1:'Mon', 2:'Tues', 3:'Wedn', 4:'Thur', 5: 'Fri', 6:'Sutur', 7:'Sun']
};
alert(arr[lang]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question