sequential search basic implementation in js;