How would I make this code look less ugly?
// we are looping over an array of images // width is a parameter passed to the current function // // the resulting string looks like this: "30px 0" // (it's a tool that returns coordinates for a CSS sprite) // when iterating over the first item, we don't need // to add "-" and "px" to X coordinate result.push( ( i === 0 ? "0" : "-" + i * ( ( is2PixelRatio ? width / 2 : width ) + 10 ) + "px" ) + " 0" );