javascript boolean true false shorthand in jQuery
===

Looking at jQuery [deferred.js][1] source code,

    } else if ( !( --remaining ) ) {
		deferred.resolveWith( contexts, values );
	}

What does !( --remaining) comparison do ?

From http://stackoverflow.com/a/4943788/115988 , looks like it's a 'confusing' shorthand boolean check ?


  [1]: https://github.com/lydonchandra/jquery/blob/master/src/deferred.js