Code Snippet test

Sample


let run =-1;
let matches = -1;
const otherStats=[];
arr.forEach((val)=>{
    switch(Number(val)){
        case 12100:
            run= 12100;
            break;
        case 200:
            matches = 200;
            break;
        default:
            otherStats.push(val);
    }
});

Comments

Popular posts from this blog

Sample MCQ question

Why do we use it?