How does this work
Edit in JS Bin