  Carbon monoxide (CO) is predicted to be the dominant carbon-bearing molecule
in giant planet atmospheres, and, along with water, is important for discerning
the oxygen and therefore carbon-to-oxygen ratio of these planets. The
fundamental absorption mode of CO has a broad double-branched structure
composed of many individual absorption lines from 4.3 to 5.1 $\mathrm{\mu}$m,
which can now be spectroscopically measured with JWST. Here we present a
technique for detecting the rotational sub-band structure of CO at medium
resolution with the NIRSpec G395H instrument. We use a single transit
observation of the hot Jupiter WASP-39b from the JWST Transiting Exoplanet
Community Early Release Science (JTEC ERS) program at the native resolution of
the instrument ($R \,{\sim} 2700$) to resolve the CO absorption structure. We
robustly detect absorption by CO, with an increase in transit depth of 264
$\pm$ 68 ppm, in agreement with the predicted CO contribution from the best-fit
model at low resolution. This detection confirms our theoretical expectations
that CO is the dominant carbon-bearing molecule in WASP-39b's atmosphere, and
further supports the conclusions of low C/O and super-solar metallicities
presented in the JTEC ERS papers for WASP-39b.
