Find the Index of the First Occurrence in a String
LeetCode題目: 28. Find the Index of the First Occurrence in a String
My solution:
/**
* @param {string} haystack
* @param {string} needle
* @return {number}
*/
let strStr = (haystack, needle) => haystack.indexOf(needle);