Properties : code don't work [introduction to objects 1]


#1

Hi,

I'm on the french version of the exercice "Objet I, properties (31)".
I wrote that :

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

// enregistrez l'age et l'espece de Snoopy's dans des variables
// utilisez la notation avec point pour l'espece de snoopy
var espece =snoopy.espece;

// utilisez la notation avec crochets pour son age
var age = snoopy["age"];

And I have this comment :
"Oups, merci de réessayer.
Assurez-vous d'utiliser au moins un point pour selectionner une propriete"
(=oops, please try, you will select a properties with a point)

What is wrong here?

Thanks and sorry for my bad english !


#2

@alinemontdephgne,

Please try a refresh Browser

++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#3

Thanks for the quickly answer !
But...
I refresh my browser=>nothing
I reset code, I log out=>nothing
I reset code, close my web browser =>nothing
I reset code, change web browser (firefox=>internet explorer) =>nothing

It always the same comment
"Oups, merci de réessayer.
Assurez-vous d'utiliser au moins un point pour selectionner une propriete"

?


#4

Leave a space between equal sign and text like this:

var espece = snoopy.espece;

#5

Bingo. Congratulations !
Thanks a lot !