Didart

Concatenate Data

Mar 4th, 2022 (edited)
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function concatenateData(input) {
  2.     let firstName = input[0];
  3.     let lastName = input[1];
  4.     let age = Number(input[2]);
  5.     let town = input[3];
  6.  
  7.     let result =
  8.     `You are ${firstName} ${lastName}, a ${age}-years old person from ${town}.`
  9.  
  10.     console.log(result);
  11. }
Add Comment
Please, Sign In to add comment