Menu
×
×
Correct!
Exercise:Specify that the paramater "myVar" for the function can be either string or number:
function myFunc(myVar: string | number) {
console.log(myVar)
}
function myFunc(myVar: number | string) {
console.log(myVar)
}
Not CorrectClick here to try again. Correct!Next ❯function myFunc(myVar:) { console.log(myVar) } |