The variable arr you’re working on catch just the first of the arrays^^
You can put a console.log(arr) after num=[] and read the console log in your browser ^^
Look closely at argument(s) passed to the function. You are not passing an array of arrays, you are passing a varying number of arrays separated by commas.
Either one of these links would be helpful in formulating a solution