let radii = [3, 7, 12, 5, 9, 42, 8, 60, 45, 21, 6, 9, 14, 27, 84, 32, 52, 37, 36, 15];
- Next we would save the circumference of each circle to a variable, or print each circumference to the console.
let circumference1 = 2 * Math.PI * radius1; // or, with use of an array, var circumference1 = 2*Math.PI*radiuses[0];
let circumference2 = 2 * Math.PI * radius2; // or, with use of an array, var circumference2 = 2*Math.PI*radiuses[1];
let circumference3 = 2 * Math.PI * radius3; // or, with use of an array, var circumference3 = 2*Math.PI*radiuses[2];
let circumference20 = 2 * Math.PI * radius20; // or, with use of an array, var circumference20 = 2*Math.PI*radiuses[19];
- Finally, we would print these values to the console:
console.log(circumference1);
console.log(circumference2);
console.log(circumference3);
console.log(circumference20);