Sean McGuire wrote:When:
short_description == "Quantum Block"
chargeable_item == true (it's a tick box, default to tick)
populate internal_cost (200.00) (default 200.00 in this field)
Hi Sean, couple of things to remember:
1. Never do not check
String objects (or any other object) equality with "==". In this case you'd check if both reference variables refers to the same memory location, where object is stored.
Strings equality you suppose to check:
2. Example below is error-prone, so do not write code in that way:
instead write:
If you'd do in your way, you could easily make a mistake, for example:
Can you notice mistake? What the output would be?
3. Variable names suppose to start with lower case, and the second
word with an upper. So "changeable_item" you'd change to "changeableItem" and so on, "changeableItemCodeOneTwoThree..."