Menu
×
×
Correct!
Exercise:Specify that the paramater "myVar" for the function can be either string or number:
function myFunc(myVar: @(6) @(1) @(6)) {
console.log(myVar)
}
function myFunc(myVar: string | number) {
console.log(myVar)
}
function myFunc(myVar: number | string) {
console.log(myVar)
}
Not CorrectClick here to try again. Correct!Next ❯ |
This will reset the score of ALL 30 exercises.
Are you sure you want to continue?