Skip to content

How do I keep spaces in a string?

I am working with a substitution cipher, where each letter of the alphabet is represented by a letter from the substituted alphabet. The output I’m expecting is ‘pl m’, however I am getting ‘plo’ as the space moves to the next letter since there isn’t a space in the substit…

Merge PDF with PDF-LIB

I am trying to replicate the official example for merging 2 pdf files, but instead of hardcode the name of the file, I’d like to have the user upload two files. The code works well when the filename is hardcoded (see url2) but doesn’t work when trying to retrieve the filename from the input tag. W…

Comparing number always return false

I generate a random number with an interval and then I check if the number chooses by the user is the same, but it always returns false Answer Remove the rndNumber from function CheckNumber(rndNumber) { because that is actually the click event on the checkButton Also a good idea to cast to number since .value…