1var repeatedStringMatch = function (a, b) {2const initRepeatTimes = Math.ceil(b.length / a.length);3const isMatch = (times) => a.repeat(times).includes(b);45if (isMatch(initRepeatTimes)) return initRepeatTimes;6if (isMatch(initRepeatTimes + 1)) return initRepeatTimes + 1;7return -1;8};