Skip to content

Instantly share code, notes, and snippets.

@jslnriot
Created November 13, 2022 20:35
Show Gist options
  • Save jslnriot/60ac7f60c03d5cba0226e1c86e4105cd to your computer and use it in GitHub Desktop.
Save jslnriot/60ac7f60c03d5cba0226e1c86e4105cd to your computer and use it in GitHub Desktop.
const simpleHash = {}
simpleHash[1] = 'first'
simpleHash[2] = 'second'
simpleHash[3] = 'third'
console.log(simpleHash) // prints { '1': 'first', '2': 'second', '3': 'third' }
simpleHash[4] = 'fourth'
console.log(simpleHash) // prints { '1': 'first', '2': 'second', '3': 'third', '4': 'fourth' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment