<script> const normalizeName=name=>name[0].toUpperCase()+name.substr(1).toLowerCase(); alert(normalizeName('iVaN')); </script>