so Im trying to get my code to print out a message that returns 'This is Bob Martin from USA'.
This is what I did so far. I've been trying to figure out what went wrong but can't seem to get this to work. I provided comments to guide my thought processes
function printBio(user) {
// function to print message, user is the object and parameter for my function
// User object that possesses properties as displayed
let user = {
name: 'Bob',
surname: 'Martin',
age: 25,
address: '',
country: "USA"
}
}
return 'This is ' + user.name + ' ' + user.surname + ' from ' + user.country + '.';
// My attempt for a return statement to print my desired message
printBio();
// The last step, which is to simply have the function do its job and print the message according to the return statement
}
console.log(printBio())[<>]it opens up to a world of possibilities like legible code.