I had to view the 3rd element of an array and i did in 2 ways, but one if them is incorrect:
1st way:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

and it prints to the console: JavaScript

2nd way:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];

and it prints out "JavaScript" to the console.

so can somebody explain me why it is not acceptable to view only as an array?

thank you in advance!!


is used to get the output of a statement.

Whereas just writing a statement makes the interpreter automatically put the raw value to the console.


thank you! now i got it how it understands :smile:


You're welcome. :slight_smile:


Plz de l'aide je n'arrive pas a validé

11.Itérer sur des tableaux:

langages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"]


There are separate language categories for you to get more responses from. #fr


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