challenge-algorithms-Ana-Ca.../01-greeting/index.html

30 lines
789 B
HTML
Raw Normal View History

2021-08-18 21:00:43 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/*
Faça um algoritmo que retorne a string composta por Hello e o nome passado
*/
function greet(name) {
// implementar logica aqui
return `Hello ${name}`;
2021-08-18 21:00:43 +00:00
}
// Resultados esperados
console.log(greet("Maria"), "Hello Maria") // Hello Maria
console.log(greet("Alvin"), "Hello Alvin") // Hello Alvin
console.log(greet("Pedro Lucas"), "Hello Pedro Lucas") // Pedro Lucas
</script>
</body>
</html>