-2
I can’t reach the solution of the question! I am not able to present on the screen the complete solution! (https://i.stack.Imgur.com/0uE45.jpg)
-2
I can’t reach the solution of the question! I am not able to present on the screen the complete solution! (https://i.stack.Imgur.com/0uE45.jpg)
0
Diego, if I understand correctly, one of the ways to implement this function is the following:
function retornaEnderecoUsuario(endereco) {
return 'O usuário mora em ' + endereco.cidade + ' / ' + endereco.uf + ', no bairro ' + endereco.bairro + ', na rua "' + endereco.rua + '" com nº ' + endereco.numero + ".";
}
var endereco = {
rua: "Rua dos pinheiros",
numero: 1293,
bairro: "Centro",
cidade: "São Paulo",
uf: "SP"
}
var informacoesEndereco = retornaEnderecoUsuario(endereco);
console.log(informacoesEndereco);
String concatenation can also be done as follows:
function retornaEnderecoUsuario(endereco) {
return `O usuário mora em ${endereco.cidade} / ${endereco.uf}, no bairro ${endereco.bairro}, na rua "${endereco.rua}" com nº ${endereco.numero}.`;
}
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Thank you so much! It worked!
– Diego Carvalho