Find All Lonely Numbers in the Array
Given an array of integers arr, find all the "lonely" numbers. A number is considered lonely if it appears exactly once in the array, and the numbers immediately before and after it do not exist in the array. Return a list of all lonely numbers.
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)