为什么上面是fasle,下面是truevar re = null ,result ,i;for (i=0; i < 10; i++){ re = new RegExp("cat", "g"); re.test("catastrophe"); console.log(re.test("catastrophe")); //false result = re.test("catastrophe"); console.log(result); //true}
添加回答
举报
0/150
提交
取消