Advertisement
Spocoman

06. Concatenate Data

Aug 21st, 2024
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function concatenation(input) {
  2.     let firstName = input[0];
  3.     let lastName = input[1];
  4.     let age = Number(input[2]);
  5.     let city = input[3];
  6.    
  7.    console.log('You are ' + firstName + ' ' + lastName + ', a ' + age + '-years old person from ' + city + '.');    
  8. }
  9.  
  10. ИЛИ:
  11.  
  12. function concatenation(input) {
  13.     let firstName = input[0];
  14.     let lastName = input[1];
  15.     let age = Number(input[2]);
  16.     let city = input[3];
  17.    
  18.    console.log(`You are ${firstName} ${lastName}, a ${age}-years old person from ${city}.`);    
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement