I am working on this demo. How I can Concatenate the years.range with counter to have years.range2[0]?
let years = {
range1: [200, 2001, 2002, 2003],
range2: [2004, 2005, 206, 2007]
}
//$('#year').html(years.range1[0]);
let counter = 1;
$('#year').html(years.range + counter + [0]);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="year"></div>
years.range[counter]