PdfPrep.com

How should you complete the code?

HOTSPOT

You are creating a method named getThankYou that accepts four parameters and returns a formatted string.

The getThanksYou method has the following signature.

The method needs to return a formatted string as shown in the following example.

Thank you Ben Smith for order 1234. The total price is $321.05.

The current culture when the method executes is en-US.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Answer:

return ($”Thank you {firstName} {lastname} for order {orderNumber}. The total price is {price:C2}”);

Exit mobile version