Почему не срабатывает function для получения массива ?
let ytL = 'ytL0'
let ytP = 'ytP0'
let xLP = 'xLP0'
let yLP = 'yLP0'
let hL = ' hL0'
let hP = 'hP0'
let QMR = 1
function qmr() {
if (QMR == 1) {
ytL =11
ytP = 2
xLP =32
yLP = 4
hL = 55
hP = 6
} else
if (QMR == 2) {
ytL = 7
ytP = 78
xLP = 9
yLP = 10
hL = 11
hP = 112
} else
if (QMR == 3) {
ytL = 13
ytP = 114
xLP = 15
yLP = 916
hL = 918
hP = 19
}
return [ytL, ytP, xLP, yLP, hL, hP ];
}
let QF = [ytL, ytP, xLP, yLP, hL, hP ];
console.log(QF);