show last word using javascript, fix glitch