← all problems

initials 🌶️

Write a method that takes two String parameters, first and last (a person's first and last name), and returns their initials as a String: the first letter of each name, each followed by a period. For example, initials("Ada", "Lovelace") should return "A.L.". You may assume neither name is empty.