Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. Create a function named addBid(). The purpose of this function is to add a bi

ID: 3669033 • Letter: 4

Question

4. Create a function named addBid(). The purpose of this function is to add a bid to the
start of the bids, bidders, and bidTime arrays. Add the following commands:
a. Using the unshift() array method, insert the current value of the bidId field to the
start of the bidders array.
b. Use the unshift() array method to insert the current value of the bidAmount field
at the start of the bids array.
c. Declare a variable named nowcontaining a date object for the current date and time.
d. Extract the hours, minutes, and seconds values from the now variable, storing
these values in variables named hours, minutes, and seconds.
e. Use a conditional operator to insert leading zeroes in the minutes and seconds
values if they are less than 10.
f. Create a variable named timeText equal to the text
[hours:minutes:seconds]
where hours, minutes, and seconds are the values of the hours, minutes, and
seconds variables.
g. Using the unshift() array method, insert the value of the timeText variable at the
start of the bidTime array.

Explanation / Answer

Hi, I think that this question is dependent on some other question or programs that has given in textbook before this question. Please provide my previous part of this(as this question seems that continuation of some previous question/program)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote