Coggle requires JavaScript to display documents.
e.message
e.name
e instanceof ReferenceError);
if (!user.name) { ... }
throw "user has no name";
throw new SyntaxError("user has no name");
re = /hello/;
re.source → hello
re → /hello/
exec()
const result = re.exec("hello");
result, result[0], result.index, result.input
test()
re.test("Hello");
re = /hello/i;
re = /hello/g
match()
const str = "hello there ";
const result = str.match(re);
search()
const str = 'hello there';
const result = str.search(re);
replace()
const str = "Hello There";
const newStr = str.replace(re, "hi");
re = /^h/i;
re = /d$/i;
re = /world$/i;
re = /^hello$/i;
re = /h.llo/i;
re = /h*llo/i;
re = /gre?a?y/i;
re = /gre?a?y\?/i;
[]
re = /gr[ae]y/i;
re = /[GF]ray/;
re = /[^GF]ray/;
re = /^[GF]ray/;
re = /[A-Z]ray/;
re = /[a-z]ray/;
re = /[A-Za-z]ray/;
re = /[0-9]ray/;
re = /[0-9][0-9]ray/;
{}
re = /Hel{2}o/i;
re = /Hel{2,4}o/i;
re = /Hel{2,}o/i;
()
re = /([0-9]x){3}/;
re = /\w/;
re = /\w+/;
+ =
re = /\W/;
re = /\d/;
re = /\D/;
re = /\s/;
re = /\S/;
re = /Hell\b/;
re = /x(?=y)/;
re = /x(?!y)/;