Picture this scenario. The battery in your smartphone (doesn't matter if it's Android or iPhone) is well in the red and close to giving up the ghost, while your friend, who is clearly more prepared than you, is sporting a full-charged smartphone.
See also: Here's why Apple doesn't care about updating Macs
Here's how you can jump start a flat smartphone from any other smartphone (or, for that matter, any tablet).
All you need to do is make a simple modification to an old micro-USB cable, and you can recharge almost any micro-USB device from any other device.
Here's how you can make yourself one of these cables. You need to be handy with a soldering iron, but that's a skill well worth taking the time to learn.
Now, this cable works with most devices that have a micro-USB port (so you're not limited to smartphones), but if you want to make it work with Apple's Lightning port, you need to make one modification.
The details of how to do that are here, but the highlights are that during the soldering process, you will also need to connect pin 2 to pin 2 and pin 3 to pin 3 (this won't prevent your cable working with regular micro-USB devices), and you will also need a micro-USB to Lightning adapter.
You need never have a flat battery again!