codewars js mendapatkan karakter tengah
function getMiddle(s) {
return s.substr(Math.ceil(s.length / 2 - 1),
s.length % 2 === 0 ? 2 : 1);
}
Michael Futral
function getMiddle(s) {
return s.substr(Math.ceil(s.length / 2 - 1),
s.length % 2 === 0 ? 2 : 1);
}