Quote:
What am I doing wrong in this code?
You didn't followed requirements!
you are requested to "Do not use the built in String.includes() function!" and your code uses it:
if(str1.includes(char) ) {
you forgot to tell the function name and the semi column at the end of lines:
('awesome', 'e')
('awesome', 'z')
you can simplify the code to:
function stringIcludes(str1, char) {
return str1.includes(char);
}
}