Question: The following code generates random numbers to be added to an array, data for LIMIT items. Write the condition such that this code works correctly.
The following code generates random numbers to be added to an array, data for LIMIT items. Write the condition such that this code works correctly. You may use vscode to test that your answer works correctly. const LIMIT - 50; let data- [1: while (condition) { let number - Math.random()*100; data.push(number); 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
