Skip to content

Tag: arrays

Why is this first line not a function? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 2 y…

Combining some() and startsWith() javascript

I have an array with strings: const fruits = [‘Apple’, ‘Banana’, ‘Orange’] I am trying to write a function that returns true or false depending on if a string starts with any string in the array, which would be true for example ‘Applepie’ or ‘Bananabread&#…