Skip to content

Tag: javascript

Understanding how javascript evaluates the OR operator

I’m currently studying Javascript Algorithms. Below is the algorithm im currently trying to learn/understand. I understand the code, except for 1 line. So what this algo does, is it tries compares 2 arrays. If array b is equal to the square of each number is array a, then it should return true, else it …

JavaScript and HTML element manipulation

Project Concept: Creating an “exam maker”, which can be accessed by a teacher to create and let a student be able to access it to take. Many features would be included but to keep it simple on the question at hand i wont be including all info. Front End: List all questions in the database, using a…

setInterval Overlapping DOM changes

I’m using setInterval to iterate through some images on a page and hide/show the next in a list after x seconds have passed. Every 30 seconds, I make a GET request to check for new images from my server. Because the http request takes about a second, setInterval begins executing the next iteration of my…

Extracting a portion of a webpage?

What I have in mind is the following: Load web page Find two divs with specific class names Extract the content of everything in between, except of the last div The reason I’m asking for it to extract anything in between is that the most important div I need doesn’t have a class name assigned. EDI…

Combine javascript functions to work together

I am building a search form that filters the results based on the a text input as well as select options from four separate drop-downs (category, sub-category, location, etc). The following two functions work well, but I just realized that if I type a search term in the input, make my drop-down selections and…

How can I conditionally format my HTML table?

I have a HTML table like above I’m trying to do conditional formatting based on the formula applied on the numbers there I tried this: I could not get those values Any modifications or suggestions are appreciated Thank you Answer the only problem with your code is you are using wrong js context to searc…