How to reset/wipre Iphone 5S?

So my friend has lent me her old iphone while i wait to get mine back (long story), she has passcode to get into the phone, so i can get into it use it etc. However i want to erase/reset the iphone and put all my stuff on there however it asks for the passcode (Settings > General> Reset), i put in the one i used to unlock the phone however apparently thats wrong? I've asked her and she it can't be anything else. How do I reset the phone without having to use a passcode?

Its better to get passcode