Instruction:
Please write this code in javascript and let me know if there is any issue
Question:
1. Use our HTML template to create a file named as your name (for example if your name is john the file name would be "john.html"). Make sure to update the metadata (title, author, description...) accordingly. This HTML file should contain an h1 heading element that includes your full name and student number.
2. Create an empty element with an id of your name. This element should be used to display your output from JavaScript.
3. Create a JavaScript file named your studentid.js that performs the following:
a. Create a function that will count the number of even numbers contained in the array that is passed to this function. The array may contain values of any type, but you only count the even numbers. This function will return a number (number of instances of even numbers found in the array). Needless to say, the function will return zero, if the array is empty or no even numbers are found.
Note: The function does not display any output, nor does it return a string. Only the value of your counter is returned.
b. Call your function at least three times, passing an array with different content, and display a message for each call, as shown in the example below. Display each result as a separate h2 element inside the div element (created in your HTML):
"let evenNums = countEvenNumbers([ , 33, 4, "Hi", 5, 66, "no"]); "
Your output will be: 2 even numbers were found.
You will need to call your function two more times, passing an array that contains different values and displaying the results of those calls in a similar manner (as in the example shown above).
Step by stepSolved in 4 steps with 3 images
- MENTION EACH Section Implement all form elements to design a page as shown below. IMAGE PROVIDED BELOWarrow_forwardI need help with creatufb this HTML. Thank you. Create an HTML form that has one input text field for your Fahrenheit degrees Add a hidden field to the form, use this field to indicate the form is submitted Add a submit button to the form Make sure the form posts to the same file in the "action" Add the PHP code for: On load, populate the input text field with some default degree value, like 87 On Submit, or POST, read the input field value submitted and convert the value to a Celcius degree Use the standard formula (X°F − 32) × 5/9 = Y°C (where 5/9 = 0.5556) Display the resulting Celcius degrees Y°C in the page after you calculate the result, along with the rest of the form, so you can submit again another valuearrow_forwardbloil Q2 Write the necessary HTML & JavaScript code to add three numbers and display the result by using a user defined function namely 'funadd'. Create a button to call the above mentioned function and pass three values while calling. Answer:arrow_forward
- 1 What types of argument does the jQuery factory method accept? 2. With which jQuery method can you get or set a CSS property value? 3. What statement would you use to attach a method to the click event of an element with the ID of elem, to make it slowly hide? 4. How can you retrieve an element node object from a jQuery selection object? 5. What statement would set the sibling element immediately preceding one with the ID of news to display in bold? 6. What are the key advantages and disadvantages of using a software framework when constructing web applications? 7. What are the advantages of React's component-based approach to constructing user interfaces? 8. Describe the differences between props and state in React.arrow_forwardHTML/CSS JAVASCRIPT please help me answer this question I will give you a good rating Thank you! Given the following word search application, which searches for words in paragraphs, modify it so that it Adds two spans tab within the HTML within the designated new "Illustate" text segments as shown below. Has a new click event which searches the occurrence of the word within all span tabs residing within the first div container , then highlights the text in the span tab which contains the word c) In the same routine, count the number of times ( using a global variable) that the word is found Within the object array loop for span tabs ( where the indexOf statement is located) and after all span tabs are highlighted, send that number to a new html element ( a div, h1, span, p choice is up to you). The count should be continually accumulated and should show the total number of times a word is found in a span tab for all user activated clicks of the search button for…arrow_forwardWrite a for-loop that will write to the HTML document the value of each element in the array called myArray. Note: You only need to write a for-loop. Code on the outside of the for-loop is not necessary as we will assume that myArray has been declared and initialized with a series of array elements.arrow_forward
- Modify the menu to use an unordered list for Sandwiches and Burritos, and nested unordered lists for the list items under Sandwiches and Burritos. Use a paragraph element to enclose the text "Menu:" before the list. Invalid HTML is considered incorrect even if the rendered webpage looks correct.Menu: Sandwiches Chicken Grilled cheeseBurritos Bean Avocadoarrow_forwardEvent Listeners Go to the co_credit.js file in your editor. Create an event listener for the window load event that retrieves the field values attached to the query string of the page’s URL. Add the following to the event listener’s anonymous function: Create the orderData variable that stores the query string text from the URL. Slice the orderData text string to remove the first ? character, replace every occurrence of the + character with a blank space, and decode the URI-encoded characters. Split the orderData variable at every occurrence of a & or = character and store the substrings in the orderFields array variable. Write the following values from the orderFields array into the indicated fields of the order form: orderFields[3] into the modelName field orderFields[5] into the modelQty field orderFields[7] into the orderCost field orderFields[9] into the shippingType field orderFields[13] into the shippingCost field orderFields[15] into the subTotal field orderFields[17]…arrow_forwardch 8 apply your knowledge i need this solved. below is index.html and styles.css TASKS In the index.html file, add a table element within the main element. Nest the following caption element within the table element: <caption>2025 Sales by Quarter</caption> In the styles.css file, create a style rule for the table element that: sets the width to 80%, sets the top and bottom margins to 0, sets the left and right margins to auto, and sets a border with the values 3px solid #71881b. Create a style rule for table, tr, th, and td selectors that collapses the border and sets the padding to 2%. Create a style rule for the caption element that sets the font-size to 2em, padding to 2%, and margin-top to 2%. Create a style rule for th and td selectors that sets a border with the values 1px solid #7188bb. Create a style rule for td that center-aligns its text. Create a style rule for tr that sets the background color to #d3e788 for odd rows. index.html…arrow_forward
- There are times as a web developer when you need to interact with different data types and file types. The textbox below represents a Comma-separated values file, which is typically referred to as a CSV file. Username, Identifier, First name, Last name booker12,9012, Rachel,Booker grey07, 2070, Laura, Grey johnson81, 4081, Craig, Johnson jenkins46,9346, Mary, Jenkins smith79,5079, Jamie, Smith Your job is to represent the CSV data using a tabular format in csv_to_table.html. You need to use following HTML elements: 1 x Table element 1 x Caption element 1 x Table Head element () 1 x Table Body element () 4 x Table Header elements 6 x Table Row elements ? x Table Data elements (the number of Table Data elements is up to you to work out!)arrow_forwardWhat is wrong with the following HTML code? This is the first list item. This is the second list item. This is the third list item. а. The "id" properties must be unique in an HTML document. O b. More than one "li" element are not allowed in an unordered list. О с. All three list item elements must have a class attribute.arrow_forwardAdd the appropriate punctuation to select a group of elements based on their CSS class. var nameElements = $('___name');arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY