In my application, there are two buttons for deleting files. The first button deletes the selected file, and the second button deletes all of the user's files. The second button is only visible when the count of the user's files is 2 or more. When a user deletes a file by clicking the first button, I need to check if the number of attachments is less than 2. If it is, JavaScript should hide the second button. So, the question here is - How can I reduce Model values using JavaScript?