Conteúdo do Curso
Introduction to JavaScript
Introduction to JavaScript
3. Performing Operations in JavaScript
Understanding Assignment OperatorsMathematical Operations in JavaScriptAssignment Operators in JavaScriptIncrement and Decrement OperatorsChallenge: Variable Operations PracticeComparison Operators in JavaScriptLogical Operators ExplainedChallenge: Compare Variables in JavaScriptConcatenating Strings in JavaScriptChallenge: Build Sentences with JavaScript
4. Controlling Program Flow with Conditional Statements
5. Looping Through Data in JavaScript
Challenge: Determine Sizes with Conditionals
Task
Create a program that outputs "LARGE"
or "SMALL"
based on the given number:
- A number is considered large if it is greater than or equal to
100
. - A number is considered small if it is less than
100
. - You can assign any number to the variable
num
.
let num = ___; ___ (num ___ ___) { console.log("___"); } ___ { console.log("___"); };
- Use the
if
andelse
keywords. - Utilize the
>=
comparison operator.
let num = 100; if (num >= 100) { console.log("LARGE"); } else { console.log("SMALL"); };
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 4. Capítulo 4