Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created November 13, 2024 15:30
Show Gist options
  • Save dontpaniclabsgists/4352278abcac65ee63111455650ce4e3 to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/4352278abcac65ee63111455650ce4e3 to your computer and use it in GitHub Desktop.
let sports: string[] = ['Volleyball', 'Football', 'Basketball', 'Soccer'];
sports[1] = 'Tennis';
// Replaces 'Football' with 'Tennis'
console.log(sports);
// Output: ['Volleyball', 'Tennis', 'Basketball', 'Soccer']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment