Created
September 26, 2021 02:14
-
-
Save koalicioous/6dd2008b092dbd53f58bcc411df59708 to your computer and use it in GitHub Desktop.
This file contains 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 cetakAngka(inputValue = 123) { | |
console.log(inputValue) | |
}; | |
cetakAngka(456) | |
//Hasil: 456 | |
cetakAngka() | |
//Hasil: 123 | |
cetakAngka('angka') | |
//Error: Argument of type 'angka' is not assignable to parameter of type 'number | undefined' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment