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