var text = "ortaharfiMolanmetin"; var MiddleChar = text[Math.floor(text.length / 2)]; alert(MiddleChar);