Nice question. I guess it depends on how good the joke is. No, seriously, your question is a good riff on what seems to be the non-philosophers’ paradigm of a philosophical question, namely, ‘If a tree falls in the forest and there is nobody there to hear it, does it make a noise?’. I have to confess that when I first heard this I wasn’t at all sure what philosophical question it is asking, but I now take it that it is a question about the nature of sound. Is sound really just the experience of sound? Then if there is nobody around, there is no noise. But if sound is say really vibrations in the air, then the forest is noisy even when nobody is around.
So what is nature of funniness? Maybe a joke is funny if it has the disposition to make people laugh. One consequence of this view is that jokes are funny even when they are not being told, because the disposition is there even when it is not being manifested. It’s just like pipe cleaners, which are flexible even when they are not being bent. So on this view, the joke you told in the forest is funny even if nobody was around to hear it. If it is a good joke, that is.