As someone who is new to coding, I have a question that may seem simple to others. If I have an array like this: ["John", "Will", "Mike"], how can I display only the first letter of each element?
var friends = ["John", "Will", "Mike"];
I initially thought about using the substr
method, but now I'm curious about how to achieve this using a string manipulation technique.