// DEFINE YOUR FUNCTION BELOW: //str.slice(1) = alles was ab(!) index 1 folgt function capitalize(str){ const str2 = str.charAt(0).toUpperCase() + str.slice(1); return str2 } capitalize("eggplant") capitalize("pamplemouse") capitalize("squid")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter