-
-
Save ankitamasand/0245d775fb202da0ea80900fb4d18cf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface CustomArray { | |
[index: number]: string | |
} | |
let cars: CustomArray = ['Hatchback', 'Sedan', 'Land Rover', 'Tesla Model S'] | |
console.log('Element at position 1', cars[1]) // 'Sedan' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment