title: db.collection is not a function when using MongoClient v3.0
body: <p>I have been trying <a href="https://www.w3schools.com/nodejs/nodejs_mongodb_find.asp" rel="noreferrer">W3schools tutorial</a> on nodeJS with MongoDB. </p>
  
  <p>When I try to implement this example in a nodeJS environment and invoke the function with an AJAX call, I got the error below:</p>
  
  <pre><code>TypeError: db.collection is not a function
      at c:\Users\user\Desktop\Web Project\WebService.JS:79:14
      at args.push (c:\Users\user\node_modules\mongodb\lib\utils.js:431:72)
      at c:\Users\user\node_modules\mongodb\lib\mongo_client.js:254:5
      at connectCallback (c:\Users\user\node_modules\mongodb\lib\mongo_client.js:933:5)
      at c:\Users\user\node_modules\mongodb\lib\mongo_client.js:794:11
      at _combinedTickCallback (internal/process/next_tick.js:73:7)
      at process._tickCallback (internal/process/next_tick.js:104:9)
  </code></pre>
  
  <p>Please find below my implemented code:</p>
  
  <pre><code>var MongoClient = require('mongodb').MongoClient;
  var url = "mongodb://localhost:27017/mytestingdb";
  
  MongoClient.connect(url, function(err, db) {
    if (err) throw err;
    db.collection("customers").findOne({}, function(err, result) {
      if (err) throw err;
      console.log(result.name);
      db.close();
    });
  });
  </code></pre>
  
  <p>Note that the error occurs whenever the execution hits:</p>
  
  <pre><code>db.collection("customers").findOne({}, function(err, result) {}
  </code></pre>
  
  <p>Also, note (in case it matters) that I have installed the latest MongoDB package for node JS (<em>npm install mongodb</em>), and the MongoDB version is MongoDB Enterprise 3.4.4, with MongoDB Node.js driver v3.0.0-rc0.</p>