Count Number of Bad Pairs
You're given a 0-indexed integer array, nums. A pair of indices (i, j) is considered a bad pair if i < j and j - i is not equal to nums[j] - nums[i].
Your task is to determine and print the total number of bad pairs in nums.
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?
javascript (node 13.12.0)