iOS version after resetting the device?

If I update an iOS device to the newest software version - when I go to "Sell" the device and "reset" the device - does it set it back to the native version of iOS or retain the updated version?
If I update an iOS device to the newest software version - when I go to "Sell" the device and "reset" the device - does it set it back to the native version of iOS or retain the updated version?

it will remain on whatever version you last had it on

Original thread: https://forums.imore.com/threads/ios-version-after-resetting-the-device.372513/