JS using map
\nvar findLonely = function(nums) {\n    let countMap = new Map();\n    let result = [];\n    for (let num of nums) {\n        countMap.set(num, (countMap.get(n
```\nvar findLonely = function(nums) {\n    let countMap = new Map();\n    let result = [];\n    for (let num of nums) {\n        countMap.set(num, (countMap.get(num) || 0) + 1);\n    }\n    for (let num of nums) {\n        if (!countMap.has(num - 1) && !countMap.has(num + 1) && countMap.get(num) === 1) {\n            \n            result.push(num);\n        }\n        \n    }\n    return result;\n};\n```
['JavaScript']