Ruby - Basics and RuntimeWhat symbol is used to start a single-line comment in Ruby?A#B//C<!--D/*Check Answer
Step-by-Step SolutionSolution:Step 1: Identify single-line comment syntax in RubyRuby uses # to start a single-line comment.Step 2: Compare with other optionsOptions A, B, and C are comment symbols from other languages (JavaScript, HTML, C-style).Final Answer:# -> Option AQuick Check:Single-line comment = # [OK]Quick Trick: Single-line comments start with # in Ruby [OK]Common Mistakes:MISTAKESConfusing Ruby comments with C-style or HTML commentsUsing // instead of #Trying to use /* */ for single-line comments
Master "Basics and Runtime" in Ruby9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Ruby Quizzes Control Flow - Case with ranges and patterns - Quiz 3easy Hashes - Merge and update methods - Quiz 1easy Methods - Variable-length arguments (*args) - Quiz 9hard Methods - Predicate methods (ending with ?) - Quiz 3easy Operators and Expressions - Logical operators (&&, ||, !) - Quiz 12easy Ruby Basics and Runtime - Puts, print, and p output differences - Quiz 4medium Ruby Basics and Runtime - How Ruby interprets code at runtime - Quiz 14medium Ruby Basics and Runtime - Puts, print, and p output differences - Quiz 13medium String Operations - Gsub and sub for replacement - Quiz 15hard Variables and Data Types - String interpolation with #{} - Quiz 9hard