Skip to content

Instantly share code, notes, and snippets.

@developersoom
Created January 10, 2019 02:49
getMidStr
function solution(s) {
return s.length%2 === 0 ? s[(s.length/2)-1]+s[s.length/2] : s[Math.floor(s.length/2)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment