Thu Nov 05 2020 15:33:58 GMT+0000 (Coordinated Universal Time)
Saved by @snigdhakhurana10
function pallindromeString(str){ let start=0, end=str.length -1; while(start <= end){ if(str[start] === str[end]) continue; return false; } return true; } console.log(pallindromeString('samasa'));
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments