问题
Why javascript indexOf method always return 0 for empty string. If i used any string indexOf("") always returns zero. Any reason for this. Explain the reason briefley.
var str="jquery";
var index=str.indexOf("") \\ Always returns zero for any string.
Thanks in advance.
来源:https://stackoverflow.com/questions/28692565/why-javascript-indexof-empty-string-always-returning-zero