There is the official answer, and then the vaguaries the Watchtower leaves open, so that it can still attract new people and not offend JWs that are not totally heartless.
Salvation only for Jehovah's Witnesses shows numerous quotes that only active, baptised JWs will be saved (and their minor children). This is reinforced by concepts such as you needed to be on the ark to be saved in the flood. Not everyone on earth was contacted by Noah, but they all drowned nonetheless.
But the Watchtower opens it up by saying things like, "It is up to God to judge." It makes it seem God may allow some others to be saved, and some JWs take it that way to appease their own consciences, but that does not mean what it seems, as the doctrine is God will not save someone that is not a baptised active JW. So it is a dishonest misdirection.
The dishonesty can be seen in the following quote. It actually says that it is not only Jws that will be saved, but goes on to show that it is only Jws that will be saved.
" Do You Feel That You Are the Only People Who Will Be Saved?
No. Many millions who lived in centuries past and who weren’t Jehovah’s Witnesses will have an opportunity for salvation. The Bible explains that in God’s promised new world, “there is going to be a resurrection of both the righteous and the unrighteous.” (Acts 24:15) Additionally, many now living may yet begin to serve God, and they too will gain salvation. In any case, it’s not our job to judge who will or won’t be saved. That assignment rests squarely in Jesus’ hands."