[Typescript] Readable Solution with Code Documentation
\n// Leetcode: https://leetcode.com/problems/minimum-deletions-to-make-array-beautiful/\n\nvar minDeletion = (nums: number[]): number => {\n    let deletions = 
```\n// Leetcode: https://leetcode.com/problems/minimum-deletions-to-make-array-beautiful/\n\nvar minDeletion = (nums: number[]): number => {\n    let deletions = 0;\n\n    for (let i = 0; i < nums.length; i += 2) {\n        if (nums[i] === nums[i + 1]) {\n            i--;\n            deletions++;\n        }\n    }\n\n    return ((nums.length - deletions) % 2) !== 0 ? deletions + 1 : deletions;\n};\n\n```
['TypeScript']