JavaScript: behavior and interactivity
JavaScript adds behavior: menus that open, forms that validate a field before submitting, content that updates without reloading the page. Not every web design course goes deep here, and not every job requires it. But the programs that cover it, like the Noble Desktop certificate track, prepare you for front-end development work as well as design.
If your goal is purely visual design, JavaScript may be optional. If you want to build and maintain the things you design, it is not. A sensible checkpoint in any course: can you explain what happens between a click and the page changing?