We report NuSTAR observations of the millisecond pulsar-low-mass X-ray binary (LMXB) transition system PSR J1023+0038 from 2013 June and October, before and after the formation of an accretion disk around the neutron star. Between June 10 and 12, a few days to two weeks before the radio disappearance of the pulsar, the 3-79 keV X-ray spectrum was well fit by a simple power law with a photon index of Gamma = 1.17(-0.07)(+0.08) (at 90% confidence) with a 3-79 keV luminosity of 7.4 +/- 0.4 x 10(32) erg s(-1). Significant orbital modulation was observed with a modulation fraction of 36% +/- 10%. During the October 19-21 observation, the spectrum is described by a softer power law (Gamma = 1.66(-0.05)(+0.06)) with an average luminosity of 5.8 +/- 0.2x10(33) erg s(-1) and a peak luminosity of approximate to 1.2x10(34) erg s(-1) observed during a flare. No significant orbital modulation was detected. The spectral observations are consistent with previous and current multiwavelength observations and show the hard X-ray power law extending to 79 keV without a spectral break. Sharp-edged, flat-bottomed dips are observed with widths between 30 and 1000 s and ingress and egress timescales of 30-60 s. No change in hardness ratio was observed during the dips. Consecutive dip separations are log-normal in distribution with a typical separation of approximately 400 s. These dips are distinct from dipping activity observed in LMXBs. We compare and contrast these dips to observations of dips and state changes in the similar transition systems PSR J1824-2452I and XSS J1227.0-4859 and discuss possible interpretations based on the transitions in the inner disk.