You need about a metre of string for this to work. Start by looping one end of the string and then open the door as much as you can. Loop the string around the chain with your fingers. Pull the other end of the string over the top of the door frame and unlock the door. You can also use the previously mentioned rubber-band method, or if it’s a barlock, you can use an envelope. As always, this isn’t about breaking into someone else’s room but a good way to get into your own when you’re locked out. Hit up Secrets from the Yumiverse for a handy infographic walking you through each method.
How to Open a Door Chain Lock or Bar Latch from the Outside [Secrets from the Yumiverse]