It is possible to use nested switch statements in JS. Buth they are generally not considered a best practice. They:
The better approach is to extract each case into separate private methods.