What does `Promise.allSettled()` return when some promises reject?
-
A
It rejects immediately with the first error
-
B
It resolves with an array of outcome objects for all promises
-
C
It resolves with only the fulfilled values
-
D
It throws a synchronous error