For this Question: Print unique values from an array containing only numbers.
Complete the given function such that it returns unique numbers from the array given as input.`arrOfNum` is an array of numbers onlyThe function should return an array containing only the unique numbers from the input arrayINPUT:
1 1 1 2

OUTPUT:
1
2

INPUT:
1 2 2 4 5 6 6

OUTPUT:
1
2
4
5
6
, I have written this Solution Code: function uniqueNumber(arrOfNum) {
  const set = new Set(arrOfNum);
  return [...set];
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?