CodeWithMMD

Home
Challenges

Call a function before its declaration to see how hoisting works in function declarations.

Output:
  • declareFunction

    4 months ago

    Declare a function named greet that logs 'Hello, world!' to the console.

  • hoistMe

    4 months ago

    Call a function before its declaration to see how hoisting works in function declarations.

  • logArguments

    4 months ago

    Create a function that logs all received arguments using the arguments object.

  • sumRest

    4 months ago

    Use the rest operator to accept any number of arguments and log their total.

  • greetDefault

    4 months ago

    Create a function that greets a name. If no name is passed, it should greet 'Guest'.

  • personAge

    4 months ago

    Create an object with a getter and setter for the age property.

  • scopeExample

    4 months ago

    Understand function scope by logging a variable from inside and outside a function.

  • thisKeyword

    4 months ago

    Log the value of 'this' inside an object method.

  • methodVsFunction

    4 months ago

    Create an object method and a standalone function and log 'this' in both.

  • PersonConstructor

    4 months ago

    Create a constructor function to build a person object with a name and age.

  • bindThis

    4 months ago

    Use bind to explicitly set the value of 'this' when calling a function.

Mohammad Fallah

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

© 2025 CodeWithMMD. All right reserved.

Built with Nextjs