Create JavaScript - Needle in a haystack