Depends what types of games I guess.
If we’re talking web-based or mobile type games, then yes why not.
However if your plan is to eventually use engines like Unity / Unreal, then no.
But to get started, sure you can use JS!
■■■■, I was planning to use Unity to program the video games I have in mind, probably will still learn it to get similar with programming