For this you need the electronegativity values of these elements.
EN(Na) = 0.93
EN(Cl) = 3.16
EN(H) = 2.2
The electronegativity difference for Na and Cl is: 3.16 – 0.93 = 2.23 > 1.7
So an ionic bond.
The electronegativity difference for H and Cl is:
3.16 – 2.2 = 0.96 < 1.7
So a polar covalent bond because 0.96 is also larger than 0.5.