wes d2a2ba9e15 first commit 4 anos atrás
..
README.md d2a2ba9e15 first commit 4 anos atrás
code.cpp d2a2ba9e15 first commit 4 anos atrás
unitTest.cpp d2a2ba9e15 first commit 4 anos atrás

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".