Kizspy | Question: 37
(Choose 1 answer)
Analyze the following codes:
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const userSchema = new Schema({
name: String,
email: String,
age: Number,
createAt: String
});
const User = mongoose.model('User', userSchema);
Which right document is saved in MongoDB with above mongoose?
A. User [{name:'Abbert',
email: '
[email protected]',
age: 24,
createAt: 20/4/2020'
},{name:'Mary',
}]
email:
[email protected],
age: 24,
createAt:'20/4/2020'
B. User [{name:'Abbert',
email: '
[email protected]',
age: 24.
createAt: 20/4/2020'
},{name:'Abbert',
email:
[email protected],
age: '24',
createAt:'20/4/2020'
}]
C. User [{name:'Abbert',
email: '
[email protected]',
age: '24',
createAt: 20/4/2020'
},{name:'Mary',
}]
email: '
[email protected]',
age: 24,
createAt:'20/4/2020'
D. User [{name:'Abbert',
email: '
[email protected]',
age: '24'