I need help writing a Javascript function which will take a string as an arugment and then filter out an array of strings starting with the string I pass as an argument.
So if I have the following array:
let words = ['simple', 'single', 'side', 'sacked', 'apple', 'orange']
I need a javascript funtion that will look at every string in this array, and give me a second array called myFilteredWords which start with the letters 'si" - assumuming that I pass 'si" as an argument to the funtion.
Open in new window