! inverts a value, and gives you the opposite boolean:
!true == false
!false == true
!1 == false
!0 == true
--[value] subtracts one (1) from a number, and then returns that number to be worked with:
var a = 1, b = 2;
--a == 0
--b == 1
So, !--pending subtracts one from pending, and then returns the opposite of its truthy/falsy value (whether or not it’s 0).
pending = 2; !--pending == false
pending = 1; !--pending == true
pending = 0; !--pending == false
And yes, follow the ProTip. This may be a common idiom in other programming languages, but for most declarative JavaScript programming this looks quite alien.