Find the Repeated Number in an Array

You are given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. However, there is one integer that is repeated in the array. Your task is to find and print this repeated number.

Ada AI

I want to discuss a solution

Help me solve this

Give more examples

What's wrong with my code?

How to use 'for loop' in javascript?