← Back to challenges

Are the Numbers Equal?

JavaScriptMediumnumberslanguage_fundamentalsconditionsvalidation

Instructions

Create a function that returns true when num1 is equal to num2; otherwise return false.

Examples

isSameNum(4, 8) ➞ false

isSameNum(2, 2) ➞  true

isSameNum(2, "2") ➞ false

Notes

Don't forget to return the result.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Football Points