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
|
2022-10-23 10:41:13 +00:00
|
|
|
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>
|