Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Language to use: JavaScript
- Instructions: Write a function named "addEmUp" declared this way:
- function addEmUp() {
- // Your code goes here.
- };
- The function's name must be "addEmUp"
- addEmUp returns the total of the numbers in an array. The name of the array is LASVEGAS and the array has 3 values in it.
- The array LASVEGAS exists - do not create it - just use it.
- Not allowed in your code: 10
- Code structure: Indent each code or comment line in a code block 5 spaces
- Lines of code per comment: Each 3 lines of code require at least 1 comment line.
- A comment is at least 20 characters.
- function addEmUp() {
- //calculate the total of array named LASVEGAS
- return total
- LASVEGAS[1]+LASVEGAS[2]+LASVEGAS[3];
- };
Add Comment
Please, Sign In to add comment