Scarlet has the following code in her script:
Var namesArr =[''Joseph',' Charlotte'', ''Nicole''];
She wants to add the name Hank to the end of the array so that its length is 4. What code should she use?
Suggested Answer: D
Get Premium 1D0-735 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
13 comments · newest first
KA
Katina
11 months ago
Yeah, push is the way to go here!
GI
Gilma
11 months ago
I thought unshift adds to the start, not the end?
MI
Mireya
12 months ago
Wait, is namesArr [4] ''Hank''; even valid?
BA
Barbra
12 months ago
Definitely option B! That's the right way.
LA
Laquanda
1 year ago
You can use namesArr.push('Hank'); to add to the end.
BU
Bulah
1 year ago
I remember that unshift adds to the beginning, so that can't be right. I think push is definitely the way to go here.
GA
Gail
1 year ago
I'm not sure about the syntax in option B, though. Shouldn't it be namesArr.push('Hank') instead of namesArr push ('Hank');?
AV
Avery
1 year ago
I practiced a similar question where we had to add an element to an array, and I believe the correct method was push.
TR
Trinidad
1 year ago
I think we need to use a method to add an item to the end of the array, but I can't remember if it's push or something else.
JO
Johnna
1 year ago
Okay, let me think this through step-by-step. The question is asking about the deviation between the measured and actual values. That sounds like it's referring to the accuracy of the measurement, so I'm going to go with A. Bias.
IR
Irene
1 year ago
This looks pretty straightforward. I think I'll go with option D - "name = input()" since that seems to be the most direct way to accept user input and store it in a variable.
AN
Anthony
1 year ago
I've set up a few of these connections before, so I've got a good handle on this. The key things are the Instance Hostname, the Keystore Password, and the Business Manager Username.
VI
Vinnie
1 year ago
I'm a bit confused here. The question mentions that the pool members are listening on port 8080, but the monitors should work on port 9080? That doesn't seem to match up. I'll need to think this through carefully.