I want to use "part1.length" in the function below by adding the variable "value" and "part" to one variable named "partvalue", which should contain "part1", so I can show the length of the array and use it in other functions. When I add '1' to 'value' then javascript should use the array 'part2'.
var part1 = {'Hallo','test'}
var part2 = {'Hallo2','test2'}
var value = 1;
var part = 'part'
var partValue = part + value;
var dosomething = function(){
if(anotherValue < partValue.length){..... // Javascript should work with "part1.length" there, but it doesn't. What am I doing wrong. I didn't know what to search for on the internet, because I am very new here.