0

I am trying to scrape data from the weather website. The code runs every 5 hours. The returning value will be assigned to an array. After the array element exceed 10 elements, the first element will be removed for example:

var Temp=[1,2,3,4,5,6,7,8,9,10]

after the update

var Temp=[2,3,4,5,6,7,8,9,10,11]

assume those numbers in the array are the temperature value.

var Temp = [console.log(await client.Weather({ symbol: 'Temp' }))]

Sorry I have very limited knowledge in this area. I have been searching to find a solution but I didn't find guide help me in that.

M.J.
  • 15
  • 4
  • Does the weather api just return one of those elements in the array? – yoyobigmanyo Sep 23 '20 at 14:03
  • Somehow it answers my question. However, how I am supposed to add the new console.log the new elements. I am not sure if Java is different from Javascript. Could you please suggest some keywords I can search to guide me to the solution. Thanks – M.J. Sep 23 '20 at 15:51

0 Answers0