A simple Search function in JS