dontbesatisfied / MongoDB-QnA

카카오톡 오픈채팅방 https://open.kakao.com/o/gcgPaEmc 에서 올라온 질문과 답변을 올려놓는 저장소
7 stars 0 forks source link

index collection #4

Closed psyduck113 closed 3 years ago

psyduck113 commented 3 years ago

Enviroment(please complete the following information):

Describe the question A clear and concise description of what the bug is.

for(i=0;i<1000000;i++){ db.users.insert( { "i":i, "username":"user"+1, "age":Math.floor(Math,random()*120), "create d":new Date() } ); } uncaught exception: ReferenceError: random is not defined : @(shell):1:72

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

dontbesatisfied commented 3 years ago

this is typo error

Math,random -> Math.random