DEV Community

Discussion on: Swap two numbers without using a temporary variable

yoursunny profile image
Junxiao Shi

The temporary array is most likely optimized away.

Thread Thread
steventhan profile image
Steven Than

That's almost certain, iirc most of the array related code are written C++, at least for Chrome's V8 anyway