Skip to content

Javascript, remove jQuery call

I have a file.js like this: My question is (I’m not sure how jQuery works at this) What is doing the last if statement? My idea is to convert that all function in a React util like And to use its methods and values, but I don’t understand what it is doing that last part that I said. Any help

Using a for-loop to retrieve elements from an Array

I’m new to JS and keep running into issues for a recent class assignment. I’ve reached out to my professor for help but I’m still not understanding it. For our assignment, I need to use a for-loop to retrieve elements from my beatlesArray and concatenate them into a string variable with this format if the ima…

How to make to drawing a SVG with D3.js?

I’m trying to draw a map in an SVG with the GEOJSON data that I bring from this API, the SVG paths are filled with the data, however, the SVG is blank, as can be seen when executing the code below. Notice the document.write, the data is returned correctly. I tested it with another GEOJSON file, and mana…

Trying to remove attribute from HTML using JS

Ive made a quiz app, with HTML and JS only and im trying to remove an id from a element which has the attribute, however when i run the code to remove it my JS doesnt find the attribute in any of the elements, if i manually inspect i can see it in the html? i do add this element