What is the max number of indexes in an array on khan academy
does anyone know what the max number of indexes in an array on khan academy or how to get by it without making another array.
🍍тнє вℓυє ριηєαρρℓє🍍(EMC^2) - I believe that there might be infinity parameters in an array. However, even if I'm wrong, this is question to ask on a video on arrays.
Hello The Blue Pineapple and SP!
There is actually a limit to the number of indexes an array can contain, and that number is 4,294,967,295.
Regards,
Loyalty
Wow, that's a lot. How did you find that out?
var lastIndex = pow(2, 32) - 2;
var a = [];
a[lastIndex] = 42;
println(a.length);
weird because I was making a drawing program that saves your work (not using local storage) but by storing informations in an array with a record, but there seemed to be a limit to how much you could draw and DEFINENTLY was smaller than 4,294,967,295. I guess it just must be a problem with my program
Please sign in to leave a comment.