Value Scaling
EasyAcc. 98.2%
+15 XP 5
Universal Magnification
Scale all data points by a multiplier.
The Assignment
Your function receives data and a scale factor.
- Iterate through the array.
- For each element, multiply it by
scale. - Print each Result on a new line.
01EXAMPLE 1
Input
data=[1, 2], scale=10Output
10
20Explanation: 110 and 210.
Constraints
- One result per line.
ArraysLoops
JavaScriptSystem handles I/O — write your function only
Loading...
1 Hidden
Input Arguments
data[1,2]
scale10
Expected Output
10 20
Click RUN to test your solution