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!
- Receive two parameters:
item(string) andprice(number). - Construct and return the message exactly as: "The [item] costs [price] rupees."
01EXAMPLE 1
Input
item = "Phone", price = 50000Output
"The Phone costs 50000 rupees."Constraints
- Use the parameters item and price.
- Punctuation and spaces must match exactly.
FundamentalsStringsTemplate Literals
JavaScriptSystem handles I/O — write your function only
Loading...
9 Hidden
Input Arguments
item"Phone"
price50000
Expected Output
The Phone costs 50000 rupees.
Click RUN to test your solution