I have to add JS to this HTML code and I have no idea how to start the JS code


The best How I Met Your Mother episode (according to fans)

As impossible as it seems to name just 1 of the 208 legendary episodes as the “best”, the fans have spoken and the highest rated episode is… wait for it…

The Slap Bet (Season 2, Episode 9)

IMDB Rating: 9.5

Robin Sparkles

In this episode, Ted is learning a few secrets about Robin, namely that she has an unexplained aversion to the mall. Robin refuses to tell Ted and the others why she won’t go to the mall, so the gang forms their own theories. Marshall believes it’s because she got married in a mall and is still married. Barney believes it has something to do with Robin having performed in a porn video. The two of them make a slap bet with each other: whoever is right gets to slap the other across the face as hard as he can. Lily is named the Slap Bet Commissioner, as long as she promises to be unbiased.

In the end, Robin’s big secret was revealed- she was a Canadian, teen pop sensation named Robin Sparkles. Barney finds the music video for her hit single “Lets Go To The Mall”. The slap bet takes a few turns throughout the episode, but ends with Marshall having the right to slap Barney 5 times- available for all of eternity (horrible call Barney).


What do you want to have occur with the text or on the webpage?
Some specifics would be needed to know what JavaScript code might be useful to you.

You can insert JavaScript code into HTML using the script tag.

  // code goes here

or if you have a separate JavaScript file:

<script src="fileName.js"></script>

Idk if this will work but this is the intended finished product https://www.reddit.com/user/ProtectionNo7982/comments/qmwo5l/intended_outcome/?utm_source=share&utm_medium=mweb

I see: a search bar, polls, a blog with “like” and “reply” for each post, buttons to “share” on Twitter and Facebook or to “like”.

I think WordPress has add-ins and stuff available somewhere so that you wouldn’t have to write JavaScript code to do that stuff.
… but I have no idea where.

It is a tall order and a big ask to bring this problem to the community with no wherewithal banked. That’s a nice way of saying, go back to the beginning and learn it all again so you are able to relate JavaScript behaviors to HTML elements with which users interact. Cover these bases and this question will not come up.

Best that nobody pitch in on this topic as the OP is asking for too much with no investment on their own part.