Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. function Tweet(text,user) {
  2. this.text = text;
  3. this.user = user;
  4. return Tweet;
  5. }// напишите код здесь
  6.  
  7. const tweet1 = new Tweet(
  8. 'I’m starting a candy company & it’s going to be amazing',
  9. 'Elon Musk'
  10. );
  11.  
  12. const tweet2 = new Tweet(
  13. 'The United States has VERY LOW INFLATION, a beautiful thing!',
  14. 'Donald Trump'
  15. );
  16.  
  17. const tweet3 = new Tweet('Vk mho cucumber', 'Дмитрий Медведев');
  18.  
  19. console.log(tweet1.user); // "Elon Musk"
  20. console.log(tweet2.user); // "Donald Trump"
  21. console.log(tweet3.text); // "Vk mho cucumber"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement