Menu
×
×
Correct!
Exercise:Create a function with 2 parameters (myVar1 and myVar2,in that order), that are both strings. Specify that myVar2 should be optional:
function myFunc(myVar1: string, myVar2?: string) {
return(myVar1 + (myVar2 || ""));
}
Not CorrectClick here to try again. Correct!Next ❯function myFunc(: , : ) { return(myVar1 + (myVar2 || "")); } |