<prompt> Write JavaScript code that takes an array of numbers as input and returns a copy of the array without any of the duplicate numbers.1, 2, 3, 2, 4, 5, 6, 7, 1, 4  <response>: Heres a JavaScript function that returns a copy of the input array without any duplicates:javascriptfunction removeDuplicatesarr let uniqueArray ; for let i 0; i arr.length; i if uniqueArray.indexOfarri -1 uniqueArray.pusharri; return uniqueArray;You can call the function with the input array, and it will return the desired output:javascriptlet inputArray 1, 2, 3, 2, 4, 5, 6, 7, 1, 4;let outputArray removeDuplicatesinputArray;console.logoutputArray; 1, 2, 3, 4, 5, 6, 7 