test ? () : () in javascript code example
Example: test() javascript
const str = "Hello World";
var item = /Hello/, // to define the item name use /item name/
result = item.test(str); //test() used to search for a specific item in strings
// returns "true"