With Javascript, how will I look for the first three letters in a string and see if they match "ABC"? Thanks
Using regex:
str.match(/^ABC/);
or using the substring method:
substring
str.substring(0, 3) == 'ABC';
if (/^ABC/.test(aString)) { }
"ABCDEF".match(/^ABC/)