CodeWithMMD

Home
Challenges

Create a function ifElseCheck that checks if a number is even or odd using if/else and logs the result.

Output:
  • checkPositive

    4 months ago

    Create a function checkPositive that uses an if statement to check if a number is positive. Log 'Positive' if true.

  • ifElseCheck

    4 months ago

    Create a function ifElseCheck that checks if a number is even or odd using if/else and logs the result.

  • daySwitch

    4 months ago

    Create a function daySwitch that takes a number (1–3) and logs the day name using switch statement.

  • countToFive

    4 months ago

    Create a function countToFive that uses a for loop to log numbers from 1 to 5.

  • countDownWhile

    4 months ago

    Create a function countDownWhile that uses a while loop to count from 3 to 1.

  • atLeastOnce

    4 months ago

    Create a function atLeastOnce that uses a do-while loop to log a number once even if the condition is false.

  • logNames

    4 months ago

    Create a function logNames that uses a for...of loop to log each name in an array.

  • logProperties

    4 months ago

    Create a function logProperties that logs all property names of an object using a for...in loop.

  • breakExample

    4 months ago

    Create a function breakExample that logs numbers from 1 to 5, but stops when it reaches 3 using break.

  • continueExample

    4 months ago

    Create a function continueExample that logs numbers from 1 to 5 but skips 3 using continue.

Mohammad Fallah

Crafting digital experiences with passion, precision, and a touch of magic

© 2025 CodeWithMMD. All right reserved.

Built with Nextjs