ES6 RegExp test()


ES6 RegExp test()

var str = "Javascript is an interesting scripting language";
var re = new RegExp( "script", "g" );
var result = re.test(str);
console.log("Test 1 - returned value : " +  result);  
re = new RegExp( "pushing", "g" );
var result = re.test(str);
console.log("Test 2 - returned value : " +  result);