programming-examples/js/String/Test whether the character at the provided character index is upper case.js

4 lines
168 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function isUpperCaseAt(str, index) {
return str.charAt(index).toUpperCase() === str.charAt(index);
}
console.log(isUpperCaseAt('Js STRING EXERCISES', 1));