Pergunta de entrevista da empresa A10 Networks

3. Please give a function which can find a string occurence time in another string.

Resposta da entrevista

Sigiloso

7 de dez. de 2016

function times(str, substr){ return str.split(substr).length - 1; }