duplicate-arguments

JAVASCRIPT KATA : Duplicate Arguments ! =======================================

Usage no npm install needed!

<script type="module">
  import duplicateArguments from 'https://cdn.skypack.dev/duplicate-arguments';
</script>

README

JAVASCRIPT KATA : Duplicate Arguments !

Description:

Complete the solution so that it returns true if it contains any duplicate argument values. Any number of arguments may be passed into the function. The solution should implement the most optimal algorithm possible.

solution(1, 2, 3) // returns false
solution(1, 2, 3, 2) // returns true
solution('1', '2', '3', '2') // returns true

The array values passed in will only be strings or numbers. The only valid return values are true and false.

Solution : solution.js

Source : codewars