Buggy Uppercase Counting

Published by Werdna in

In the Code tab is a function which is meant to return how many uppercase letters there are in an array of various words. Fix the code so that it functions normally!

Examples

countUppercase(["SOLO", "hello", "Tea", "wHat"]) ➞ 6

countUppercase(["little", "lower", "down"]) ➞ 0

counUppercase(["EDAbit", "Educate", "Coding"]) ➞ 5

Notes

  • Check the Resources for some array methods that might be helpful.
  • This is originally a loose translation of a Python problem.
Watch a quick demo on how Edabit works.