Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function concatenation(input) {
- let firstName = input[0];
- let lastName = input[1];
- let age = Number(input[2]);
- let city = input[3];
- console.log('You are ' + firstName + ' ' + lastName + ', a ' + age + '-years old person from ' + city + '.');
- }
- ИЛИ:
- function concatenation(input) {
- let firstName = input[0];
- let lastName = input[1];
- let age = Number(input[2]);
- let city = input[3];
- console.log(`You are ${firstName} ${lastName}, a ${age}-years old person from ${city}.`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement