Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

/ *

BOOLEAN COM OPERADORES DE COMPARAÇÃO

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

Usando operadores de comparação, conclua as declarações inacabadas.

As variáveis ​​devem ter valores que correspondam aos resultados esperados.

* /

var studentCount = 16;

var mentorCount = 9;

var moreStudentsThanMentors; // finish this statement

var roomMaxCapacity = 25;

var enoughSpaceInRoom; // finish this statement

var personA = "Daniel";

var personB = "Irina";

var sameName; // finish this statement

/*

DO NOT EDIT BELOW THIS LINE

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

console.log("Are there more students than mentors?", moreStudentsThanMentors);

console.log(

"Is there enough space in the room for all students and mentors?",

enoughSpaceInRoom

);

console.log("Do person A and person B have the the same name?", sameName);

 

 

/ *

RESULTADO ESPERADO

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

Existem mais alunos do que mentores? verdade

Há espaço suficiente na sala para todos os alunos e mentores? verdade

A pessoa A e a pessoa B têm o mesmo nome? falso

* /

/ *

Predicados

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

Escreva um predicado para predicados

As variáveis ​​devem ter valores que correspondam aos resultados esperados.

* /

// Conclua a função de predicado para testar se o número passado é negativo (menor que zero)

 

 

var number = 5;

var numberNegative = isNegative(number);

var numberBetweenZeroAnd10 = isBetweenZeroAnd10(number);

console.log("The number in test is " + number);

console.log("Is the number negative? " + numberNegative);

console.log("Is the number between 0 and 10? " + numberBetweenZeroAnd10);

 

 

 

 

/ *

RESULTADO ESPERADO

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

O número em teste é 5

O número é negativo? falso

O número está entre 0 e 10? verdade

* /

#10

welligton costa
Module by welligton costa, updated more than 1 year ago
No tags specified