JSFiddle - React, Tailwind, and code Playground

JavaScript

var str = 'nathan';

str = str[0].toUpperCase() + str.slice(1);

document.write(str);