This is what I would use if you are looking for a pure knot solution. One of the easiest ones to use as well since it is just two overhands knots.
Image from Wikipedia
Basically lay the ends of the elastic along side each other. Then take one end and tie an overhand knot around the other end. Then do the same with the other loose end. (Describing how to tie knots is a hard venture). Once both knots are tied you can pull the elastic away from the knots and that will pull them tight.
This really depends on the material the cord is made out of but this works for certain ropes. Use something simple like a lighter (some people use heat guns) to melt the elastic ends together. Assuming that material allows this, fusing after you put the cord in a knot will help create a stronger bond. you do have to be careful not to overheat the cord as that can damage it or if nothing else reduce its longevity. Might not be worth it for the project you describe.