인프런 커뮤니티 질문&답변
1:45 쯤에 Declare와 Define 질문있습니다.
해결된 질문
작성
·
388
·
수정됨
퀴즈
Git 커밋 메시지를 작성할 때, 일반적으로 제목은 어떻게 시작하는 것이 좋나요?
Verb의 과거형으로 시작해요.
대문자로 시작해요.
동사(Verb)의 원형으로 시작해요.
'Add', 'Fix' 같은 특정 단어만 사용해요.
답변 2
0
https://stackoverflow.com/questions/20822022/whats-the-difference-between-variable-definition-and-declaration-in-javascript
위 스택오버플로우 질문 답변 및
아래 geeksforgeeks 콘텐츠가 도움되실 것 같습니다.
Declaration of a variable is for informing the compiler of the following information: name of the variable and the type of the value it will hold i.e., declaration gives details about the properties of a variable. Whereas, in the Definition of a variable, memory is allocated for the variable.
변수 선언은 변수의 이름과 변수가 보유할 값의 유형을 컴파일러에 알리기 위한 것입니다. 즉 선언은 변수의 속성에 대한 세부 정보를 제공합니다. 반면, 변수 정의에서는 변수에 메모리가 할당됩니다.
출처: https://www.geeksforgeeks.org/difference-between-definition-and-declaration/
프로그래밍 하면서도 정의와 선언을 완벽하게 구분하지 않아도 커뮤니케이션에 큰 무리는 없지만, 정확하게 커뮤니케이션하려면
int a = 0; // Define a variable with initial value 0
int b; // Declare a variable
이 맞습니다.
0
Define나 Declare를 명확하게 구분하지 않고 그냥
Declare a variable with initial value. 혹은 Define a variable without initial value. 처럼 쓰면 완전히 틀린표현일까요?





 (1).png?w=112)