Your "If" Statement


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-XEDZA/0/4?curriculum_id=506324b3a7dffd00020bf661#


var text = "Hey, how are you \
doing? My name is Bobby.";
var myName = "Bobby"
var hits = []
for (var i = 0; i < text.length; i++) {
if (text[i] === "B")
console.log
}
My code is working. I was just wondering, is the lesson on the left saying that:

var text = "Hey, how are you \
doing? My name is Bobby.";

is an array? Because I thought an array had to be in brackets. So is the variable text an array? And if so, can arrays be made within quotes as above?


Replace this line with your code.


#2

An array is enclosed in brackets.

A string is enclosed in quotes.

I don't understand what you're asking.


#3

definitely not.its just a string.because javaScript arrays are used to store multiple values in a single variable.An array is a special variable, which can hold more than one value at a time.