"> 07-02_object "> 07-02_object ">
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>07-02_object</title>
</head>
<body>
	<script type="text/javascript">
		/*
			# 객체 생성자 함수
			- function 함수 (변수_1, 변수_2){
				this.property = 변수_1;
				this.property = 변수_2;
				this.method = function(){
					
				};
			}
			var 변수 = new 함수(변수_1,변수_2);
		*/
		function Subject(name, credit){
			this.name = name;
			this.credit = credit;
			this.info = function(){
				return '과목명 : ' + this.subject + ' / ' + this.credit + '학점';
			};
		}
		var html = new Subject('html', 3);
		console.log('과목명 : ' + html.name);
		console.log('학점   : ' + html.credit);
		console.log(html.info());
	</script>
</body>
</html>