Have you ever made I-cord using wooden thread spool with four nails around the opening? Sure you have! Here's a quick and easy way to make it with 2 double-pointed (DP) needles.
Cast on 3 or 4 stitches on one needle. Knit all stitches. *Without turning needle, slide stitches to the right end of needle. Bring yarn around BACK of work, and knit, being sure first stitch is pulled extremely tight. Repeat from *, until the cord is the length you wish.
Give the cord a tug to make the little carry across the back disappear, though there shouldn't be much of a carry if you're only knitting on 3 or 4 stitches.