MCQs > IT & Programming > Ruby On Rails > For the String class, what's the difference between '#slice' and '#slice!'?

Ruby On Rails MCQs

For the String class, what's the difference between "#slice" and "#slice!"?

Answer

Correct Answer: "#slice" returns a new object, "#slice!" destructively updates — mutates — the object's value.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ruby On Rails Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it