题解 | #子字符串频次#
子字符串频次
http://www.nowcoder.com/practice/053caf9d4d9d449bb45a6b02a572f71b
找规律,用split即可
const _searchStrIndexOf = (str, target) => {
// 补全代码
const arr = str.split(`${target}`)
return arr.length - 1
}
子字符串频次
http://www.nowcoder.com/practice/053caf9d4d9d449bb45a6b02a572f71b
找规律,用split即可
const _searchStrIndexOf = (str, target) => {
// 补全代码
const arr = str.split(`${target}`)
return arr.length - 1
}
相关推荐