Added comments to the 'addItem' JS function.