Menu
Coddy logo textTech

Adding The Twist

Part of the Fundamentals section of Coddy's JavaScript journey — lesson 56 of 77.

challenge icon

Challenge

Easy

Add 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') returns true if it includes the character and false if it does not.

Try it yourself

let num = parseInt(inp); // Don't change this line

// Type your code below

All lessons in Fundamentals