Adding The Twist
Part of the Fundamentals section of Coddy's JavaScript journey — lesson 56 of 77.
Challenge
EasyAdd a small twist to the game:
Numbers that contain the digit "3" but aren't divisible by 3 or 7 will output <strong>Almost Fizz</strong>
To check if a string contains a char, use
<strong>includes()</strong>. For instance,word.includes('a')returnstrueif it includes the character andfalseif it does not.
Try it yourself
let num = parseInt(inp); // Don't change this line
// Type your code belowAll lessons in Fundamentals
4Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Type Coercion7Bill Split Calculator
Welcome MessageCalculating The Tip And Total2Variables
NumbersStringBooleanNaming ConventionsEmpty VariablesRecap - Initialize VariablesConstants3Operators Part 1
Arithmetic OperatorsModulo OperatorArithmetic ShortcutsComparison OperatorsStrict vs Loose EqualityRecap - Simple Math6Basic IO
OutputOutput with VariablesType Conversion - Part 1Type Conversion - Part 2Recap - Till 120Recap - True or False