题解 | 子字符串频次
子字符串频次
https://www.nowcoder.com/practice/053caf9d4d9d449bb45a6b02a572f71b
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> </head> <body> <script> const _searchStrIndexOf = (str, target) => { // 补全代码 return str.split(target).length - 1; }; console.log(_searchStrIndexOf("hello world", "o")); </script> </body> </html>