  A measurement is presented of electroweak (EW) production of a W boson in
association with two jets in proton-proton collisions at $\sqrt{s} =$ 13 TeV.
The data sample was recorded by the CMS Collaboration at the LHC and
corresponds to an integrated luminosity of 35.9 fb$^{-1}$. The measurement is
performed for the $\ell\nu$jj final state (with $\ell\nu$ indicating a
lepton-neutrino pair, and j representing the quarks produced in the hard
interaction) in a kinematic region defined by invariant mass $m_\mathrm{jj}$
$>$ 120 GeV and transverse momenta $p_\mathrm{T j}$ $>$ 25 GeV. The cross
section of the process is measured in the electron and muon channels yielding
$\sigma_\mathrm{EW}$(Wjj) = 6.23 $\pm$ 0.12 (stat) $\pm$ 0.61 (syst) pb per
channel, in agreement with leading-order standard model predictions. The
additional hadronic activity of events in a signal-enriched region is studied,
and the measurements are compared with predictions. The final state is also
used to perform a search for anomalous trilinear gauge couplings. Limits on
anomalous trilinear gauge couplings associated with dimension-six operators are
given in the framework of an effective field theory. The corresponding 95%
confidence level intervals are $-$2.3 $<$ $c_{\mathrm{WWW}}/\Lambda^2$ $<$ 2.5
TeV$^{-2}$, $-$8.8 $<$ $c_{\mathrm{W}}/\Lambda^2$ $<$ 16 TeV$^{-2}$, and $-$45
$<$ $c_{\mathrm{B}}/\Lambda^2$ $<$ 46 TeV$^{-2}$. These results are combined
with the CMS EW Zjj analysis, yielding the constraint on the $c_{\mathrm{WWW}}$
coupling: $-$1.8 $<$ $c_{\mathrm{WWW}}/\Lambda^2$ $<$ 2.0 TeV$^{-2}$.
