[TypeScript] Readable Solution with Code Documentation
\n// Leetcode: https://leetcode.com/problems/find-all-lonely-numbers-in-the-array/\n\ntype map = {\n    [key: number]: number;\n};\n\nconst findLonely = (nums: 
```\n// Leetcode: https://leetcode.com/problems/find-all-lonely-numbers-in-the-array/\n\ntype map = {\n    [key: number]: number;\n};\n\nconst findLonely = (nums: Array<number>): Array<number> => {\n    let lonelyNumbers: Array<number> = [];\n    let map: map = {};\n\n    for (let i: number = 0; i < nums.length; i++) {\n        map[nums[i]] ? (map[nums[i]] += 1) : (map[nums[i]] = 1);\n    }\n\n    /*\n        LOOP THROUGH MAP AND CHECK FOLLOWING CONDITIONS\n            1) IF NUMBER HAS NO ADJACENT NUMBERS PRESENT IN THE MAP\n            2) IF NUMBER APPREARS EXACTLY ONCE IN THE MAP\n    */\n    for (let [key, value] of Object.entries(map)) {\n        const next = Number(key) + 1;\n        const previous = Number(key) - 1;\n        if (!map.hasOwnProperty(next) && !map.hasOwnProperty(previous) && value === 1) {\n            lonelyNumbers.push(Number(key));\n        }\n    }\n\n    return lonelyNumbers;\n};\n\n```
['Hash Table', 'TypeScript']