mongodb / v3.6 / reference / reference-method-isWindows.html

_isWindows()

_isWindows ( )
Returns: boolean.

Returns “true” if the mongo shell is running on a system that is Windows, or “false” if the shell is running on a Unix or Linux systems.