Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS I #6

Open
eduv2-prod bot opened this issue Mar 20, 2023 · 0 comments
Open

JS I #6

eduv2-prod bot opened this issue Mar 20, 2023 · 0 comments

Comments

@eduv2-prod
Copy link
Contributor

eduv2-prod bot commented Mar 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants