Gunnar Bittersmann: eval()

Beitrag lesen

@@dedlfix

myElements: function(id){
    arrElements = new Array();
    arrElements[0] = [1, 3, 4, 5, 7];
    arrElements[1] = [0, 2, 3, 4, 5, 6, 7];
       
    return arrElements[id];
}   

Einfacher geschrieben:

myElements: function(id){
    arrElements = [
        [1, 3, 4, 5, 7],
        [0, 2, 3, 4, 5, 6, 7]
    ];
       
    return arrElements[id];
}

Wobei das eben Gesagte noch zu berichtigen ist:

myElements: function(id){
    var arrElements = [
        [1, 3, 4, 5, 7],
        [0, 2, 3, 4, 5, 6, 7]
    ];
       
    return arrElements[id];
}

bzw.

myElements: function(id){
    const arrElements = [
        [1, 3, 4, 5, 7],
        [0, 2, 3, 4, 5, 6, 7]
    ];
       
    return arrElements[id];
}

LLAP 🖖

--
“When UX doesn’t consider all users, shouldn’t it be known as ‘Some User Experience’ or... SUX? #a11y” —Billy Gregory