Well done! Let's do a little review of string methods. Remember, you call a method by using the .
operator, like this: "string".method
.
잘햇다! 이제 문자열 메소드에 대해서 조금 살펴보자. 메소드를 불러올 때 마침표 를 이용한 다는 걸 기억하자. 요렇게 : "아무문자".method
문자열과 문자열 메소드
Well done! Let's do a little review of string methods. Remember, you call a method by using the .
operator, like this: "string".method
.
잘햇다! 이제 문자열 메소드에 대해서 조금 살펴보자. 메소드를 불러올 때 마침표 를 이용한 다는 걸 기억하자. 요렇게 : "아무문자".method
Instructions
지시 사항
Declare a variable
name
and set it equal to a string containing your name.
변수 name를 선언하고 니 이름을 가진 문자열에 대입시켜라.
Call .downcase
on your name to make it all lower case, call .reverse
on your lowercase name to make it backwards, then call .upcase
on your backwards name to make it ALL CAPS.
니 이름을 모두 소문자로 변환시키기 위해 변수 name 뒤에 .downcase를 붙여라. 그리고 .reverse를 니 소문자 이름에 붙여서 거꾸로 배열되게 만들어라. 그리고 .upcase를 거꾸로 된 니 이름에 불러서 모두 대문자로 만들어라.
In Ruby, you can do this two ways: each method call on a separate line, or you can chain them together, like this: name.method1.method2.method3
루비에서 너는 이 일을 두개의 방법으로 할 수 있다. 각각의 메소드를 별도의 줄에서 부르거나, 아니면 한꺼번에 묶을 수 있다, 요렇게 : name.method1.method2.method3