Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 61 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top