Created
November 21, 2022 19:33
-
-
Save appoll/870f3f3b08b9916f5e32db0892b343c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// E7. | |
// Start with 2 hardcoded arrays, e.g. prices1 & prices2 | |
// Calculate a third array that contains the sum of the elements in the first two arrays. | |
prices1 = [12, 16, 24, 28] | |
prices2 = [1, 1, 1, 1] | |
pricesSum = [] | |
for (i=0; i < prices1.length; i++){ | |
} | |
console.log("Result: " + pricesSum); | |
// expected result: [13, 17, 25, 29] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment