Question du test Ruby (legacy)

Quel est le résultat du code Ruby suivant ? class Foo def initialize(z) @z = z end def x @z * 2 end end foo = Foo.new(1) puts foo.x

Intermédiaire

Here is a technical question for developers that want to validate their skills before a technical interview.
This question is written in french and need to be translated to english.
Use english for technical terms in the french version (example : "string" instead of "chaine de caractère".)
Double escape all quotes in result like this: //"
Give result as JSON.

Auteur: Olivier MillaStatut : PubliéeQuestion passée 16 fois
Modifier
0
Évaluations de la communautéPersonne n'a encore évalué cette question, soyez le premier !