What's missing in this code?
func('AaB'); // bAa
func('JaVaScRiPt FuN'); // nUf TpIrCsAvAj
func('CoDiNg Is CoOl'); // LoOc Si GnIdOc
function func(str) {
return str
.split('')
.
.map((char) => {
if (char === char.
) {
return char.
;
} else
return char.toUpperCase();
}
})
.join('');
}
Type or select from these options