확장자 추가
Perferences > General > Content Types > Add
테마 변경
Perferences > Aptana Studio> Theme > 변경
jQuery 자동완성 쓰기
메뉴 > Commands > Bundle developer > install bundle > jquery 선택
폰트
Verdana
확장자 추가
Perferences > General > Content Types > Add
테마 변경
Perferences > Aptana Studio> Theme > 변경
jQuery 자동완성 쓰기
메뉴 > Commands > Bundle developer > install bundle > jquery 선택
폰트
Verdana
첫번째 값을 평가한후 뒤에 값을 평가하지 않는것.
//논리 연산자 /* var aa = false; var bb = true; aa && bb // bb 평가x aa || bb // bb 평가 */ var calculator; // &&연산에서 좌측 표현식이 undefined값을 가지면 //false로 평가되어 우측 평가식을 실행하지 않는다. calculator && document.writeln("calcuator.add(2,3):" + calculator.add(2,3)); calculator = { add : function(op1, op2){ return op1 + op2; } }; // && 연산에서 좌측 표현식이 0, undefined, null, NaN, "" 이외의 값을 가지면 // true로 평가되어 우측평가식이 실행됩니다. calculator && document.writeln("calcuator.add(2,3):" + calculator.add(2,3)); // || 연산에서 좌측 표현식이 undefined값을 가지면 false로 평가되어 우측 평가식을 실행함. calculator.subtract || (calculator.subtract = function(op1, op2){ return op1 - op2; }); calculator.subtract || document.writeln("calcuator.subtract (2,3):" + calculator.subtract (2,3));
undefined
- 변수가 선언은 되었지만 값이 할당된 적이 없는 변수에 접근하건, 존재하지 않은 객체 프로퍼티에 접근할 경우 반환되는 값.
- 논리 연산에서 false로,
산술연산에서는 NaN로,
문자열 연산에서는 "undefined"로 변환되어 연산됨.
null
- 예약어
- 보통 참조 타입과 함께 쓰여, 어떠한 객체도 나타내지 않는 특수한 값으로 사용
- 논리 연산에서는 false로,
산술연산에서는 0으로,
문자열 연산에서는 "null"로 변환되어 연산됨.
//undefined와 null var a; var obj = {}; document.writeln('a: '+ a);//a: undefinde document.writeln('obj: '+ obj);//obj: [object Object] document.writeln('obj.prop: '+ a);//a: obj.prop:: undefined obj = null; //객체 참조를 제거 document.writeln("obj: " + obj);//obj : null if(!a){} //!undefined if(!obj){} //!null
리터럴(Literal) : 프로그램의 코드상에 데이터의 값을 표현하는 방식
자바스크립트의 리터럴 :
- 숫자 리터럴, 문자열 리터럴, 배열 리터럴, 객체 리터럴, 함수 리터럴, 블리언 리터럴, undefined와 null 리터럴
interface
- abstract 클래스의 한 종류로 포함 멤버의 제약을 가짐(순수 디자인 목적)
- 다중 상속이 가능한 유일한 클래스
interface의 포함 멤버
- public static final 멤버 필드
- public abstract 멤버 메서드
- public static inner 클래스
interface AAA{ //모두 동일 public static int a = 0; public static final int b = 100; public final int c = 200; public int d = 300; public abstract void aaa(); public void bbb(); void ccc(); } interface E{} interface F extends E{} interface G{} interface H extends E, G{} class I{} class J implements E, G{} class K extends I implements E, G{}