Added find function in javascript