It is necessary to replace all last names starting with a small letter with the same last names that only begin with a capital title, i.e. change the case of the first letter. Where is the mistake?
<script>
var a=["бердяев","Афанасенко","савельев"]; document.write("Input:<br>"); document.write(a+"<br><br>"); for (var i=0;i<a.length;i++) { if ((a[i].charAt(0))==['а-я'])
`` {a [i] = a [i] .charAt (0) .toUpperCase () + a [i] .substr (1) .toLowerCase ();} else continue; } document.write ("Output: <br>" + a);
</script>
a[i].charAt(0))==['az']
mean? (1) "Berdyaev" - the first character - a space - alexlz