Question
1
/ 1
--:--
Question 1
Review the code.
var capitalCities = [ " USA " : " Washington D.C. " , " Spain " : " Madrid " , " Peru " : " Lima " ]
Which two statements add the capital city of " Italy " to the dictionary? (Choose 2.)
A
capitalCities[ " Rome " ] = " Italy "
B
capitalCities.append([ " Italy " : " Rome " ])
C
capitalCities[ " Italy " ] = " Rome "
D
capitalCities = capitalCities + [ " Italy " : " Rome " ]
E
capitalCities.updateValue( " Rome " , forKey: " Italy " )
Reveal Answer
Correct Answer
Correct Answer:
You're on the free plan. Get Full Exam Access
Unlock all questions, detailed explanations and more.
Get Premium →
Finish
Overview
1
Answered
Skipped
Not visited
End & Review