Vets-Who-Code/js-web-path-fitzcodes

JS I

Opened this issue · 0 comments

Task: Demonstrate the ability to use Javascript to manage basic data structures.
Conditions: Member has a web page that is loaded to a browser
Standards: Make a Pull Request with a a Javascript file that is loaded in the head of an HTML file that does the following:
  • Assign an array of 5 random numbers to a variable
  • Assign a number to a variable and call it counter
  • Use a for loop to iterate through the array and add the counter to each item in the array
  • On each iteration add 1 to the counter
  • Define a function that takes an array as an argument and uses a while loop to console.log whether each item in the array is even or odd
  • Call the above function with the previously assigned array variable as a parameter
  • Call the above function with a new array with 5 random numbers
  • Delete the third item of the saved array
  • Add a string to the front of the saved array
  • Add a string to the end of the saved array
  • console.log the saved array

Reference