daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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]}`);
RAW Paste Data
Top