Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const goku = {
- name: 'Goku',
- color: 'blue',
- toString: function() { console.log(`Hi, I'm Goku! My color is ${this.color}`); }
- };
- const A21 = {
- name: 'Android 21',
- color: 'green'
- };
- const combos = {
- green: '2M 5M x Kamehameha',
- blue: '2M 5M x Bombs >'
- };
- let selection = goku;
- selection.toString();
- //console.log(`${selection.name}'s color is ${selection.color}`);
- console.log(`For ${selection.name}, do this combo: ${combos[selection.color]}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement