Page 1 of 1

1. Given the following code... var speed = 30; var density = 50; var flow - 0; for(var i = 2; i <= 4; i++) { if( speed >

Posted: Sat May 14, 2022 6:43 pm
by answerhappygod
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 1
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 1 (28.08 KiB) Viewed 28 times
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 2
1 Given The Following Code Var Speed 30 Var Density 50 Var Flow 0 For Var I 2 I 4 I If Speed 2 (25.47 KiB) Viewed 28 times
1. Given the following code... var speed = 30; var density = 50; var flow - 0; for(var i = 2; i <= 4; i++) { if( speed >= 11 ) { > density += 10; } else if( density < 51 || 1 == 3 ) { density += 1; } else { density = flow + speed; } speed- flow++; } a) What is the final value that is assigned to the 'speed' variable? b) What is the final value that is assigned to the 'density' variable? c) What is the final value that is assigned to the 'flow' variable? d) What is the final value that is assigned to the counter variable 'i'?

2. . var num1 = 40; var num2 = 90; var num3 = 20; var num4 = 130; var sum; for(var i = 1; i <= 2; i++) { if( num3 > num1 && num2 < num4 ) { num4 = num3; num1 = num1 + num4; sum = num1 - num2; } else if num4 < num1 || num2 != num3 ) { num1 = num4; num2 = num2 + num3; sum = num4 + num2; } else { num3 = num2; num4 = num3 - num4; sum = num4 + num1; } } What is the final value assigned to the sum variable?