05. Function Logic πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ—οΈ Write Function to Evaluate Equality of Two Values

Work with a partner to implement the following user story:

  • As a developer, I want to know when two values are equal to one another.

Acceptance Criteria

  • Create a function using function declaration that checks if two parameters are equal in both value and type, just value, or not equal in any way and prints it to the console.

    • Call the function so that it prints each option.
  • Create a function using function expression that iterates through an array and checks if each index is less than 10 and prints if it is or isn’t.

    • Call the function.

πŸ’‘ Hints

How can we use parameters to give a name to the two values that we want to evaluate with the function?

πŸ† Bonus

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • What is hoisting?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here