Within elastic limit there is no loss of energy in deforming because no permanent deformation.
\(\therefore\) We can say
Work done by external force \(=\) heat produced
Or (-)ve of work done by restoring force \(=\) heat produced
\(-1 \times-10 \,J =\Delta H\)
\(10 \,J =\Delta H\)