While I was recently studying JS coming from a C++ background, I found out that the pop() function of arrays has a return value in JS.
Now, in C++ we don't have a return value for pop_back() method because according to a paper by Cargill, it is impossible to design an exception-safe stack pop function as answered here
So how are things working in JS or am I missing something?