Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var str1 = 'table football';
- var regex1 = new RegExp('foo','y');
- regex1.lastIndex = 6;
- console.log(regex1.sticky);
- // expected output: true
- console.log(regex1.test(str1));
- // expected output: true
- console.log(regex1.test(str1));
- // expected output: false
Add Comment
Please, Sign In to add comment