There are many different kinds of variables you'll encounter as you progress through these courses, but right now we're just concerned with regular old local variables.
이 과정을 거치면서 다양한 종류의 변수를 만나게 될 것이다. 하지만 일단 우리는 통상적인 지역변수(로컬변수)에 대해서만 신경 쓰기로 하자.
By convention, these variables should start with a lowercase letter and words should be separated by underscores, like counter
and masterful_method
.
규약에 따르면, 변수들은 소문자로 시작되어야 하고 단어들일 경우 언더바"_"로 분리되어야 한다. counter 와 masterful_method 처럼 말이다.
Ruby won't stop you from starting your local variables with other symbols, such as capital letters, $
s, or @
s, but by convention these mean different things, so it's best to avoid confusion by doing what the Ruby community does.
루비는 변수의 처음을 상형문자로 하든 대문자로 하든 막지 않는다. 하지만 규약에서 벗어나면 다른 뜻을 가지게 되어 혼란을 야기함으로 그냥 루비 커뮤니티에서 정해놓은 방식대로 하기로 하자.
지시사항
Create a variable name
in the editor and set it equal to your name as a string (between quotes, like this: "Eric"
). Your string can be capitalized, but name
should be all lower case!
변수 name을 에디터에 생성해보자 그리고 변수에 니 이름을 문자열로 집어 넣자 (따옴표 사이에). 니 문자는 대문자로 쓰던말던 상관 없지만 변수명 name는 소문자로 쓰자!