Unpack the parcel train by position and the label by name: Mr. Wiryo walks to the wagon the iterator read, Sri reads the label’s key, and find out when a…
The key idea
Arrays by position, objects by name, defaults only for undefined
Try it in this playground
Skip a position Use [a, , c]: wagon 1 is read, then dropped.
Use a default A one-wagon train with [a = …, b = …]: b gets its default.
null is not undefined ['teh', null] with defaults: b stays null.
Break it on purpose Unpack a null label, or assign { tujuan, kg } with no parentheses: see the engine’s error.