Instruções

Passo 1

Neste workshop, você revisará como trabalhar com os diferentes métodos do objeto Math construindo um Mathbot. Este Mathbot registrará algumas operações matemáticas e mensagens no console na tentativa de ensinar sobre o objeto Math do JavaScript. Para esta primeira etapa, comece criando uma variável chamada botName e atribua a ela o valor string "MathBot". Então, crie outra variável chamada greeting e atribua a ela a sentença "Hi there! My name is [botName goes here] and I am here to teach you about the Math object! No lugar do espaço reservado [botName goes here], use a variável botName. Você pode usar template literals ou concatenação de strings com o operador + para conseguir isso. Finalmente, registre a variável greeting no console.

O que fazer:

Testes:

  • Você deve ter uma variável chamada `botName`.
  • A variável `botName` deve ser uma string.
  • Você deve atribuir o valor string `"MathBot"` à variável `botName`.
  • Você deve ter uma variável chamada `greeting`.
  • Sua variável `greeting` deve ser uma string.
  • Você deve atribuir a seguinte frase à variável `greeting`: `"Hi there! My name is [MathBot goes here] and I am here to teach you about the Math object!` Certifique-se de substituir `[MathBot goes here]` pela variável `botName`.
  • Você deve registrar a variável `greeting` no console.

Console