autocomplete: what's the best way?

autocomplete: what's the best way?

supposing to have a javascript array, whats's the best way to autocomplete?
i've searched in archive, but all posts are very old...