How to extract value from a lookup table in Jscript

Respected sirs,
I have a 2 column table with more than 40 rows of data which is arranged as under.

column 1            column2
head-AGE          Pension value
40                       15
41                       14.90
42                        14.45
43                        14.10

and so up to AGE -80.
Being new to JS , I need to find the way to search for AGE say 70 and lookup corresponding value in column2, as like lookup function in excel.
I tried for finding a value in a example as given below…

function pensionLookup(val) {
var result ;
var lookups ={ 
  40:
  15,
  
 50:
 14,
    
 60:
 13,
    
 70 :
 12,

 80:
 10
}
result = lookups[val]
return result;
}
console.log(pensionLookup(70)); //12

but for that I have to type manually all the rows data from excel table as given above.
As my knowledge about Js is very limited, I shall be highly thankful if I am advised:

  1. Whether my approach is correct or not if I want to use javascript instead of XL lookup; I have to use ‘result’ further to calculate the commuted value of Pension.
  2. what are other ways to tackle this in Js.
  3. what if the data table is 1000 rows.
  4. Is there a simpler way to tackle this for novices.
  5. any other advice welcome.
    regards
    |