InsertMany syntax issue

I tried to do the exercise and the first thing I encountered is copy/pasting did not seem to want to work for me … so I tried to enter them manually one at a time into the command window … it worked fine until I got to the end where I needed to add the “ordered” bit and then it kept tossing errors when I tried to do the last bit of the code …\

“ordered”: false

and kept saying I had a syntax issue. Not entirely sure what I was not doing correctly.

Try to remove quotes on ordered
From docs:
[ <document 1> , <document 2>, … ],
writeConcern: ,

The lesson does not mention using the syntax “writeConcern” … it just says “ordered” false . When I tried it without the quotes on ordered as suggested there was no change. I styll get the message [js] SyntaxError:expected expression, got ‘)’ and am not sure what to do now.

can you run it from the command line?

mongo “” --username m001-student --password m001-mongodb-basics insertMany-unordered.js

Everything up to the javascript file is your normal connection string for the mongo shell