Function not working when clicked

Hi, I was trying to display a text when a button is clicked. I added eventListener to the button and used textContent function to display the string. However the script does not seem to work. I am pasting a link to my code -

I cannot understand where am I going wrong. I am new to JS and might have done something stupid. Any help would be great help. Thank you

Hello @shlokk;

The Issue you are having is related to your CSS. It is just plain CSS doing its work.

In your code

Once you input your name and click the button to generate a random story. You would see that it does not display any STORY.

The fact is your visibility for the paragraph that is still kept hidden.( Now we have some glory in us that should shine as code warriors. ) It should not be kept hidden when you click the button so you just have to add this at the last line in result()

function result() {
//Some code goes on here
story.style.visibility = 'visible';
}

So that is all: Glory shines.

P.S: It seems you are not done with your code. Wish you Journey mercies on your JavaScript journey.

Thanks.
Tolu.