mongodb / v3.6 / reference / reference-method-db.version.html

db.version()

db. version ( )
Returns: The version of the mongod or mongos instance.