A developer is building a Lightning web component that displays quantity, unit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price.
Why would it be B?
what is the calculate in calculate Total()?
It should be A.
First update the first line to
import { LightningElement, api } from 'lwc';
then add in the get method.
Just returning quantity * unitPrice is also incorrect. You should put the this in front to let the system know what to reference.
upvoted 1 times
...
Log in to Pass4Success
Sign in:
Report Comment
Is the comment made by USERNAME spam or abusive?
Commenting
In order to participate in the comments you need to be logged-in.
You can sign-up or
login
Simon
2 years ago