wes d2a2ba9e15 first commit 4 years ago
..
README.md d2a2ba9e15 first commit 4 years ago
code.cpp d2a2ba9e15 first commit 4 years ago
unitTest.cpp d2a2ba9e15 first commit 4 years ago

README.md

Capitalize the Names

by Alex Golubov tags: loops, arrays, formatting

Summary

Create a function that takes an array of names and returns an array where only the first letter of each name is capitalized. Examples capMe(["mavis", "senaida", "letty"]) ➞ ["Mavis", "Senaida", "Letty"] capMe(["samuel", "MABELLE", "letitia", "meridith"]) ➞ ["Samuel", "Mabelle", "Letitia", "Meridith"] capMe(["Slyvia", "Kristal", "Sharilyn", "Calista"]) ➞ ["S

Instructions

Create a function that takes an array of names and returns an array where only the first letter of each name is capitalized.

Examples

capMe(["mavis", "senaida", "letty"]) ➞ ["Mavis", "Senaida", "Letty"]

capMe(["samuel", "MABELLE", "letitia", "meridith"]) ➞ ["Samuel", "Mabelle", "Letitia", "Meridith"]

capMe(["Slyvia", "Kristal", "Sharilyn", "Calista"]) ➞ ["Slyvia", "Kristal", "Sharilyn", "Calista"]

Notes

  • Don't change the order of the original array.
  • Notice in the second example above, "MABELLE" is returned as "Mabelle".