We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functiontheLoveLetterMystery(s){// Write your code hereletcount=0;letc=0;letd=s.length-1;while(c<d){letk=s.charCodeAt(c);letl=s.charCodeAt(d);count+=Math.abs(l-k);c++;d--;}returncount;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Love-Letter Mystery
You are viewing a single comment's thread. Return to all comments →
JS: