mo49
5/31/2019 - 9:33 AM

HowManyKeywordStrInclude.js

const target = 'a'
const str = 'hello javascript!'
const num = str.split(target).length - 1
console.log( `${target}が含まれる数 : ${num}` )