How to reset content & settings on my iPhone 4S?

I need to reset my iPhone and Apple told me to press "erase all content and settings".So I did and its asking me for a passcode. I don't have one & everything I try, fails.

I don't know why it would ask for passcode… Did you have a passcode you used to unlock the phone?
(when you slide to unlock)