0

I’m confused regarding the use of “with” and “of”.

Should I use “array with objects” or “array of objects”?

Why?

1

"Array of elements" denotes that the array is made up of the elements.

"Array with elements" denotes that the array is found with or alongside some elements. This can be used much like "with" in other contexts to refer to traits of the array or partial content.

Some examples:

"A string in computer science is an array of characters."

"The string 'Bubba' is an array with a 'u' in it."

"This is an array with labels for each value."

"This array is anonymous."

1

It really depends on how you're using it. For example "He displayed an array with objects from all of the ships involved, in order to honor those involved in one of the greatest naval actions ever". Or you could say "There was an array of objects from the ships involved, the better to honor those who participated in the Battle of Trafalgar".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.