Yes. The sodium chloride dehydrates the weeds and throws off the plant’s water balance (source).
If you mix it with water, you create an effective natural herbicide. However, salt is toxic for all plants, so it can easily kill other plants and grass around your weeds which is why we recommend you be extremely careful when using saltwater.