A beginner to mongoDB. went through this website to know how to create a javascript file . .mongorc.js and
<code>
function insertData(dbName, colName, num)
{
var col = db.getSiblingDB(dbName).getCollection(colName);
for (i = 0; i < num; i++)
{
col.insert({x:i});
}
print(col.count());
}
<code>
and the link is here function insertData ... the tutorial adviced to store the function in a javascript file called .mongorc.js . I dont know how to create it and use it and where to store it . need help .