영상
개념
<script>
/*
[개념] 출력문
[1] console.log("출력할내용");
(1) Chrome 브라우저에서 F12를 눌러
(2) Console 탭에서 확인 가능하다.
[2] document.write("출력할내용");
(1) 웹 브라우저 화면에서 확인 가능하다.
(2) <br> 태그를 통해 줄을 바꿔 출력할 수 있다.
(3) 를 통해 공백 한 칸을 표현할 수 있다.
[3] 문장의 마침은 세미콜론(;)이다.
*/
console.log(10);
document.write(10); document.write("<br>");
document.write(10, "<br>");
document.write(10 + "<br>");
console.log("안녕하세요");
document.write("안녕하세요<br>");
console.log("공 백");
document.write("공 백");
console.log("===================");
console.log(" 커피메뉴 ");
console.log(" 까페라떼 5000");
console.log(" 아메리카노 4600");
console.log(" 까페모카 5700");
console.log(" 합계: 15300");
console.log("===================");
document.write("===================<br>");
document.write(" 커피메뉴 <br>");
document.write(" 까페라떼 5000<br>");
document.write(" 아메리카노 4600<br>");
document.write(" 까페모카 5700<br>");
document.write(" 합계: 15300<br>");
document.write("===================<br>");
</script>
Java
복사