How can I show and hide Like/Unlike buttons using Javascript in my Web app?
I’m doing online course CS50W by Harvard and building a web app similar to twitter.
When user sees a post I need to show the user Like or Unlike button depending on user liked it or not. There’s also a counter showing how many users liked the post so far. I am able to update the counter if the user liked or unliked the post, but I’m having problem with the code showing or hiding the buttons.