Guest User

Untitled

a guest
Jun 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Language to use: JavaScript
  2. Instructions: Write a function named "addEmUp" declared this way:
  3.  
  4. function addEmUp() {
  5.  
  6. // Your code goes here.
  7.  
  8. };
  9.  
  10. The function's name must be "addEmUp"
  11.  
  12. 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.
  13.  
  14. The array LASVEGAS exists - do not create it - just use it.
  15. Not allowed in your code: 10
  16. Code structure: Indent each code or comment line in a code block 5 spaces
  17. Lines of code per comment: Each 3 lines of code require at least 1 comment line.
  18.  
  19. A comment is at least 20 characters.
  20.  
  21.  
  22.  
  23. function addEmUp() {
  24. //calculate the total of array named LASVEGAS
  25. return total
  26. LASVEGAS[1]+LASVEGAS[2]+LASVEGAS[3];
  27.  
  28. };
Add Comment
Please, Sign In to add comment