skip to Main Content

Html – Issue with 'for' loop in JavaScript

This is supposed to be a trivia question website, which reflects whether the user's answer is incorrect or not after clicking buttons. My issue arises with the 'for' loop related to the incorrect answers. document.addEventListener('DOMContentLoaded', function(){ // Part 1 event.preventDefault();…

VIEW QUESTION

Replacechild on a paragraph javascript

I am trying to edit a post and dynamicaly update the Dom with my editPost function (The posts are created with another Javascript function). function editPost(post_id){ // get the post text const post_element = document.getElementById(post_id); const post_text_element = post_element.querySelector('p.card-text'); const…

VIEW QUESTION
Back To Top
Search