Use javascript to sentence case input