function capFirst(str) { return str[0].toUpperCase() + str.slice(1); } console.log(capFirst('hello')); //output //Hello