Count the Capital Letters

Published by zatoichi49 in

Given a string of letters, how many capital letters are there?

Examples

capital_letters("fvLzpxmgXSDrobbgMVrc") ➞ 6

capital_letters("JMZWCneOTFLWYwBWxyFw") ➞ 14

capital_letters("mqeytbbjwqemcdrdsyvq") ➞ 0

Notes

N/A

Watch a quick demo on how Edabit works.