how do I console.log the variables:, bobsFollowers and tinaFollowers, in one line? they have no assigned variable or anything so how do I go i log them?
hi @awesomecoder139 ,
If you do understand how to log a string message using console.log() method, then for variables wise likely be the same.
Example 1 - using the ’ + ’ (plus operator) to concatenate string values.
Example 2 - using Template Literals (the application of back ticks ` ` )
Hope it helps.
Ok I did it I did try your method it didn’t work but it turns out all I needed to do was just type bobsFollowers[i]. chuckles like spongebob
@awesomecoder139 that’s great to hear your issue has been resolved! Cheers to more learning in the current computer language and more after.
On a side note, it would be nice to phrase your title and problem statements in details as much otherwise, the community volunteers will second guess or have to create multiple examples to tackle one root problem.
Based on your response, your question title sounds like “How do I log bobsollowers and tinasFollowers arrays in one console.log statement” and your problem statement should state the variables are arrays from the beginning, and you would like to know how to access the value within the arrays (you can refer to the following codebyte example for more).