エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ここにツイート内容が記載されますhttps://b.hatena.ne.jp/URLはspanで囲んでください
Twitterで共有ONにすると、次回以降このダイアログを飛ばしてTwitterに遷移します
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
Goal You can run theRuby code on a modern browser likeGoogleChrome. Try to press "RunRuby" bu...Goal You can run theRuby code on a modern browser likeGoogleChrome. Try to press "RunRuby" button.Observe the behavior of method func1 and define a method answer1 that performs the same behavior as func1. # You can call `func1` p func1(0) #=> 1 p func1(1) #=> 2 p func1(2) #=> 3 # Can you tell how `func1` is defined? # Hint: def func1(n) = n + ??? # Define `answer1` that works like `func1` def