I have the following function
//user_length() gets integer input from the user in order to determine length
//random_digit() returns 1-9 randomly
var random_number = function (){
let sequence = [];
for(i = 0; i < user_length() ; i++ ){
sequence.push(random_digit());
}
return sequence.join('')
}
var finalString = random_number();
whenever I call the function it behaves as it has to but when I try to use the variable, it returns an empty string, I think it’s because the function is not being called, but I don’t know how to fix that