GoConqr has a new look! Let us know what you think.

Module 18 of 35 · Text

#18

welligton costa

/ *

Condicionais

---------------------------------

Escreva uma função que verifique se uma frase contém a palavra "código"

- se a frase contém a palavra "código", retorna verdadeiro

- caso contrário, retorna falso

Dica: Google como verificar se uma string contém uma palavra

* /

 

 

function containsCode(sentence) {

}

/*

DO NOT EDIT BELOW THIS LINE

--------------------------- */

var sentence1 = "code your future";

var sentence2 = "draw your future";

var sentence3 = "design your future";

console.log("'" + sentence1 + "': " + containsCode(sentence1))

console.log("'" + sentence2 + "': " + containsCode(sentence2))

console.log("'" + sentence3 + "': " + containsCode(sentence3))

 

/ *

RESULTADO ESPERADO

---------------

'codifique seu futuro': verdadeiro

'desenhar seu futuro': falso

'projete seu futuro': falso

* /

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?