DevilRoshan / Question

前端问题解决
0 stars 0 forks source link

[Daily]以下代码输出 #97

Closed DevilRoshan closed 4 years ago

DevilRoshan commented 4 years ago

出自小程序前端面试星球

// 以下代码输出
const lowerCaseOnly = /^[a-z]+$/;
console.log(lowerCaseOnly.test('str'));
console.log(lowerCaseOnly.test(null));
console.log(lowerCaseOnly.test());
DevilRoshan commented 4 years ago

https://github.com/DevilRoshan/Question/blob/master/20200802-js-code-RegExp-test.md