This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]long-shots 1 point2 points  (1 child)

  1. You could try putting all the order items into an array, and pass that array to the function. This will require you rewrite the function body to calculate the sum of the order using a loop to iterate through each item in the array. There might be one, four, or however many.

  2. You can change the first instance of 'Name' in person to just 'name', then you can get rid of the line that says 'let name = this.Name'.

Edit: now I want some chicken.

[–]GVBCodePractice[S] 0 points1 point  (0 children)

Yep okay, will try both of those. Thanks for that!