Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. const goku = {
  2. name: 'Goku',
  3. color: 'blue',
  4. toString: function() { console.log(`Hi, I'm Goku! My color is ${this.color}`); }
  5. };
  6.  
  7. const A21 = {
  8. name: 'Android 21',
  9. color: 'green'
  10. };
  11.  
  12. const combos = {
  13. green: '2M 5M x Kamehameha',
  14. blue: '2M 5M x Bombs >'
  15. };
  16.  
  17. let selection = goku;
  18.  
  19. selection.toString();
  20.  
  21. //console.log(`${selection.name}'s color is ${selection.color}`);
  22.  
  23. console.log(`For ${selection.name}, do this combo: ${combos[selection.color]}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement