Python startswith() allows me to test if a string starts with a tuple of strings as shown below, which is what I want to achieve with JavaScript:
testvar = 'he', 'hi', 'no', 'ye'
if my_string.startswith(testvar):
return True
I have seen this SO question and it did not completely help in achieving this.
I need to have a JavaScript code that will do the same thing with the Python code above.