[SPOILERS] Basic Algorithm Scripting: Confirm the Ending dilemma

[SPOILERS] Basic Algorithm Scripting: Confirm the Ending dilemma
0

#1

It says in the description that .endsWith() can be use but for this challenge they ask to us to use smth else. My question is. If I reversed both string and check them with .startsWith() it is counting as cheating or It’s like finding one of possible solutions?

P.S. I don’t want to use .starsWith() just ask your opinion on this


#2

That’s actually quite clever. It’s not as straighforward as using endsWith, and you need a bit of work to be able to pass with startsWith.

I don’t think it’s cheating, but see if you can pass with using one of the JS substring methods instead (as per the instructions).