Michael McNamara
06/06/2023, 7:14 PMerictgrubaugh
06/06/2023, 7:35 PMconst states = {
AL: ‘Alabama’,
AK: ‘Alaska’ ,
AS: ‘American Samoa’,
AZ: ‘Arizona’,
AR: ‘Arkansas’,
CA: ‘California’,
...
};
is an Object, not an Array, and the distinction is important. If you have 'AZ'
, then you would get 'Arizona'
with states['AZ']
.Michael McNamara
06/06/2023, 7:52 PMMichael McNamara
06/06/2023, 7:57 PMbattk
06/06/2023, 8:06 PMMichael McNamara
06/07/2023, 12:21 AMNElliott
06/07/2023, 7:39 AMconst states = {
AL: 'Alabama',
AK: 'Alaska' ,
etcMichael McNamara
06/07/2023, 3:13 PMbattk
06/07/2023, 3:34 PMbattk
06/07/2023, 3:37 PMMichael McNamara
06/07/2023, 5:44 PM