Dynamic Messaging

EasyAcc. 96.2%
+15 XP 5

Terminal Diagnostics

The starship's communication array is malfunctioning. You must construct a precisely formatted diagnostic message for the droid to read. If a single space is missing, the repair bot will stall!

  1. Receive two parameters: item (string) and price (number).
  2. Construct and return the message exactly as: "The [item] costs [price] rupees."

01EXAMPLE 1

Inputitem = "Phone", price = 50000
Output"The Phone costs 50000 rupees."

Constraints

  • Use the parameters item and price.
  • Punctuation and spaces must match exactly.
FundamentalsStringsTemplate Literals
JavaScript
Loading...
9 Hidden

Input Arguments

item"Phone"
price50000

Expected Output

The Phone costs 50000 rupees.

Click RUN to test your solution