Actually, Trump can’t “give up” his salary. The Treasury is required to pay it. JFK also tried to refuse his salary, and ran into the same problem. So Kennedy instead donated his salary to charity, as Trump claims he will do for the duration of his term.
Of course, with Trump, there will be a great deal more grandstanding. Kennedy made his donations without fanfare.