A code to let me choose which column do I want to show/hide

Hi there,

I have a really long table with lots of columns. All of them are important, but not everytime. So I was wondering if someone could help me to code (javascript? ) a way to let the user choose which column he wants to show or hide.

Does anyone have any clue?

Thanks!