I have an array like so:
const r1 = 1.5;
const r4 = 2.7;
const r5 = 5.8;
const r6 = [r1, r4, r5];
document.write(r6);
And I need to add the following elements at the end of the array r6: 1 2 3 4 5 6 7 8 9 10 .... up to 101 by using For Loop and print this out by using document.write();.
Does anyone know how could I do that?
Array.push()does the same thing.