how to fetch data from array in javascript code example Example: javascript declare array var array = []