1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
In the following statement, what is the value of num? Include quotation marks. | let num = "2" + "2"; | "22" | •?22•? |
What is it called when you combine two or more strings, using the plus sign? | concatenation | concatenation | |
In the following statement, what is the value of message? (Include the quotation marks.) | message = ("Hello," + "Dolly"); | "Hello,Dolly" | •?Hello,Dolly•? |
When the following statement executes, what message displays in the alert box? | alert("33" + 3); | 333 | 333 |
Write a statement that assigns to the variable famousCat the concatenation of the first name (Grumpy) and last name (Cat) of the internet's famous grouchy feline. The variable hasn't been declared beforehand. | let famousCat = "Grumpy " + "Cat"; | letfamousCat=•Grumpy•\+•Cat•; | |
Write an alert that displays the concatenation of your first name and your last name. Make up the names if you prefer. | alert("Mark " + "Myers"); | alert\(•.*•\+•.*•\); | |
Write a statement that concatenates two variables and assigns the result to a third variable. The third variable hasn't been declared beforehand. Make up the variable names. | let combo = firstPart + secondPart; | let[a-z_$][a-zA-Z0-9_$]*=[a-z_$][a-zA-Z0-9_$]*\+[a-z_$][a-zA-Z0-9_$]*; | |
Assign strings to two variables. Then concatenate them and assign the result to a third variable. None of the variables have been declared beforehand. Make up the variable names and strings. | let firstPart = "Hello, "; let secondPart = "Dolly!"; let show = firstPart + secondPart; |
let([a-z_$][a-zA-Z0-9_$]*)=•.*•;[\r\n]let([a-z_$][a-zA-Z0-9_$]*)=•.*•;[\r\n]let[a-z_$][a-zA-Z0-9_$]*=\1\+\2; | |
|
|||
|