Yes salt will get rid of slugs.
To get rid of slugs with salt just pour salt onto the slugs body and pour salt around areas where slugs crawl around.
When the slug gets salt on their body the slugs body loses moisture and when that moisture is lost the slug then dehydrates.
So when the salt dehydrates the slug by drawing moisture out of it's body the slug dies.
The slug will die a slow death from the salt so it will not be immediate but if you're having a problem with slugs then using salt to get rid of the slugs is a great natural way of getting rid of slugs.
Slugs are usually more of an annoyance than being harmful but you should still avoid touching them or getting to close to them.