Vous n'avez pas affiché une valeur contenue dans votre hash


#1

here is a screen capture of my code. Someone could tell me wfat i've done wrong ? Thanks


#2

@je22,
Could you provide the link to the course-lesson.....


#3

sorry Leonfard there it is

https://www.codecademy.com/fr/courses/ruby-beginner-fr-FR-yh7nf/1/4?curriculum_id=535e93005d81962043000001

hope it will be helpfull


#4

@je22,
I would remove the code-line

animaux = Hash.new

and have you tried 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


#5

@je22
It seems they want you to use a so-called FOR-IN loop
with which iterate over a hash
and get access to 1 property at each iteration
like

for x,y in  animaux do
  puts animaux[x]
end

#6

I've tried it but even i remove the animaux = Hash.new or i refresh my browser i've got the same result : please try again...


#7

Hi you should have the code from the previous lesson then print the item you put in the previus lesson


#8

that works now you were rigth thank you


#9

thanks it works fine now leonhard was rigth


#10