JavaScript JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Useful Array Methods

Amandeep Pasricha
Amandeep Pasricha
14,928 Points

If search is a string, why are we concatenating it with other strings?

Just wondering.

1 Answer

Steven Parker
Steven Parker
173,537 Points

Concatenation combines strings to make a larger one. So in this case, the item name is being joined with other strings to make a complete sentence to print out, such as "Yes, we have apples in the store.".

Steven Parker
Steven Parker
173,537 Points

Amandeep Pasricha — Did this resolve your issue? You can mark a question solved by choosing a "best answer".
And happy coding!