Skip to content

Instantly share code, notes, and snippets.

@laniehei
Created July 18, 2018 02:23
Show Gist options
  • Save laniehei/c8e92a98c3dd972125c389f564ebb74f to your computer and use it in GitHub Desktop.
Save laniehei/c8e92a98c3dd972125c389f564ebb74f to your computer and use it in GitHub Desktop.
// Create an object using bracket and dot notation that represents the characters and related data you may find in a game of Clue.
var game = {};
game.murderer = "??";
game['weapons'] = [
{type: 'lasers', location: 'lab'},
{type: 'angry cats' ...},
{... 'dish soap' ...}
];
game.name = [];
game.name[0] = 'Miss Scarlet';
game.push('Mr. Green');
//['Miss Scarlet', 'Mr. Green']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment