Samwise is a Software Engineer at Shire Mart. He is parsing shopping data from CSV records. Given below, is a record of an item purchased. It contains the name of the item, the quantity purchased, and the price of the item.
Help Samwise extract the data from the string using the .split()
method. Split the string into 3 values and assign them to the variables item
, quantity
and price
using destructuring. Print the string X
quantities of Y
were purchased at ₹Z
.