This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findOutlier(integers){ | |
var length = integers.length, i; | |
var evens = []; | |
var odds = []; | |
var k | |
for (i=0; i<length; i++) { | |
if (integers[i] % 2 == 0) { | |
evens.push(integers[i]); | |
} | |
if (Math.abs(integers[i] % 2) == 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', function() { | |
return console.error.bind(console, 'connection error: '); | |
}); | |