Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register

Please I’m stuck in the last js challenge… I don’t want to write code I don’t understand… I tried doing this challenge on my own, I got simple code but the more complex is what I don’t understand. Can someone please break it down to me how each piece of code works, especially the “OPENED” status