How would I write the equivalent of C#\'s String.StartsWith in JavaScript?
var haystack = \'hello world\'; var needle = \'he\'; haystack.startsWith(needle)
I am not sure for javascript but in typescript i did something like
var str = "something"; (str).startsWith("some");
I guess it should work on js too. I hope it helps!