Skip to content

Use promise-returning code without async/await

I’m trying to quickly write a simple tool in NodeJS using pdf-lib. pdf-lib appears to be designed to use promises and async/await, but I don’t want the extra code complexity of async/await for such a simple tool. How can I use functions that return a promise without the extra bother of async/await…

How to have a hidden option in a dropdown?

How to have a hidden option in dropdown so that user is unable to see it. Following is the code : User shouldnt be able to see dropdown XYZ option in the dropdown. Mainly it should be hidden.This is because in the backend I’m changing one of the options to this value and proceeding.Kindly help.Thanks in…

JS for loop loops once

My problem is that I am trying to iterate over an array several times, however, my for loop will only iterate over the array once (Or so it seems to me) which causes the outcome to be wrong. What I am trying to do is loop on this array: let arr = [“e5”, “b2”, “a1”, “c…

Very Simple HTML/JavaScript Button Not Working

What should be an incredibly simple button is not working. All I want is for it to log something to the console for some testing purposes, but it refuses to work. There’s the button in my HTML file, and below is the JavaScript that, as far as I can tell, should be working. All I want is for the button