Tell us what’s happening:
The instructions to the challenge state, “for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.”
What are Javascript substring methods?
Your code so far
function confirmEnding(str, target) {
return str;
}
confirmEnding("Bastian", "n");
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36.
As a developer, one of the most useful references I have is the MDN website. If I do a google search for “mdn substring” I get this link. Also substr and slice are useful.
Thanks, I use MDN a lot to look up stuff and I had already found these links. I wasn’t sure if that’s what they were referring to in the instructions (substring, substr, slice). I wasn’t sure if these were all the substring methods or only a few of many more. In any case I haven’t yet figured out how to use them to solve the challenge so I will keep trying.