DEV Community

Discussion on: Javascript String Methods You Must Know to Become an Algorithms Wizard

pjijin profile image
Jijin P πŸ‘¨β€πŸ’»πŸ¦„

In 5th, one of the output is wrong.

const str = 'The Force will be with you. Always.';

const newStr = str.toLowerCase();

console.log(newStr.includes('force')); //false

This will return true.

uptheirons78 profile image
Mauro Bono Author • Edited on

My mistake. I forgot to change the return value after copying the line from before. Thanks, I am going to correct ;)