I don't have a specific fix for your problem but am wondering if there might be some confusion here due to the fact that JavaScript has nothing at all to do with Oracle Java or JRE as it is probably listed, if you still have it installed. The Java Runtime Environment, a program in its own right, has fallen out of favour because it was frequently attacked.
JavaScript is not a separate program but a capability which is incorporated into most browser software that can be allowed or disallowed in the browser's settings or sometimes blocked by third party programs such as ad blockers etc.
There is a test you can run to see if JS is working in whichever browser you are using if you go here https://javatester.org/index.htm and look at the orange boxes on the top left of the page and click on 'JavaScript'. If that test confirms that JS is working in the browser, it would suggest that something else you have installed is preventing it from running and you will have to look at any browser addons or extensions that you have. I should probably add that JS itself is now considered a security risk so there may something in the browser's own settings preventing it from running.
JavaScript is not a separate program but a capability which is incorporated into most browser software that can be allowed or disallowed in the browser's settings or sometimes blocked by third party programs such as ad blockers etc.
There is a test you can run to see if JS is working in whichever browser you are using if you go here https://javatester.org/index.htm and look at the orange boxes on the top left of the page and click on 'JavaScript'. If that test confirms that JS is working in the browser, it would suggest that something else you have installed is preventing it from running and you will have to look at any browser addons or extensions that you have. I should probably add that JS itself is now considered a security risk so there may something in the browser's own settings preventing it from running.