@Jap-Leuk ,
The menu entries Edit > Comment / Uncomment > … do work – including toggle (Ctrl+Q) and single-line comment (Ctrl+K), even in the most recent Notepad++ (v7.8.9)
You hint that you are authoring some sort of webpage (“the text … was not used on the website”), but you are mentioning c/c+±style comments /* ... */ and // ... . Javascript does use c+±style comments, but you were not very helpful in the description of the problem; I cannot tell what’s really going on for you.
If the same exact code, manually typed in some other application (like Microsoft’s notepad.exe) produces the same results that you get when you type the code in Notepad++, then the question is really about the coding, not about Notepad++, so you’ve asked the question in the wrong place (cookies!), and you need to find a more appropriate forum for your question.
However, if you are truly convinced that Notepad++ itself is doing something wrong, you will get better help if you can explain the problem by using actual text (use the </> button on the forum toolbar to format your text so it doesn’t get mangled by the forum) and/or screenshots of what’s happening. (If you find that all your screenshots are from your web browser, once again I maintain that you’re probably asking the question in the wrong forum.) You need to explain to us what you think Notepad++ is doing wrong, what Notepad++ is actually doing, and how you think Notepad++ should do it differently.