//Adding '/' around regex var regex = /s/g; //or using RegExp var regex = new RegExp("s", "g");
const reguarExp = new RegExp('abc');
const regularExp = /abc/;