Last active
July 14, 2020 14:43
-
-
Save subwaymatch/eb28ade29714b11c478576dbe386067e to your computer and use it in GitHub Desktop.
Without a type check, you may mistakenly think that this code would print out 30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addTwoNumbers(num1, num2) { | |
return num1 + num2; | |
} | |
let result = addTwoNumbers('10', 20); | |
console.log(`Result: ${result}`); | |
console.log(`Return Type: ${typeof result}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment