"array of strings (*)" - MongoDB and Mongoose - Create a Model

Tell us what’s happening:
I have passed the test, but I would like to know the meaning of the asterisk in the prototype: favoriteFoods : array of strings (*). It is not mentioned anywhere in the tutorial, and googling “mongoose schema asterisk array of strings” turns up nothing useful.

Your project link(s)

solution: boilerplate-mongomongoose - Node.js Repl - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: MongoDB and Mongoose - Create a Model

Link to the challenge:

its simply saying, favoriteFoods values will be an array which will have none or one or more “strings” as its value.

it’s a prototype as in consider this as a “pseudocode” kind of a thing! unless im wrong then perhaps others can help, happy learning :slight_smile:

i was going to guess that * is from the regex * which means 0 or more (not 1 or more)

1 Like