Properties


#1

I'm not really sure why I'm having such a hard time but I can't figure this out
error message Objectname is not defined


var snoopy = new Object();
snoopy.species = "beagle";
snoopy.age = 10;

// save Snoopy's age and species into variables
// use dot notation for snoopy's species
var species = ObjectName.PropertyName;
species.beagle;

    
// use bracket notation for snoopy's age
var age =ObjectName['PropertyName']
age[10]


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.