Q37.webp
V

Q37.webp

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'

Thông tin

Category
SDN302
Thêm bởi
VanDat2002
Ngày thêm
Lượt xem
2,767
Lượt bình luận
7
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom