// match()方法在找到匹配项后,返回的是一个数组
// 若未找到匹配项则返回null
function containsNumber(str) {
    return str.match(/\d+/g) !== null 
}