영상
개념
<script>
/*
[개념] 이스케이프 문자(escape sequence)
[1] 문자열 출력 중간에 이스케이프 문자를
사용해서 다양한 효과를 표현할 수 있다.
[2] 이스케이프 문자 종류
(1) \" : "
(2) \' : '
(3) \\ : \
(4) \n : 줄바꿈
*/
console.log("\'안녕하세요\'");
console.log("\"안녕하세요\"");
console.log("\\안녕하세요\\");
document.write("\'안녕하세요\'<br>");
document.write("\"안녕하세요\"<br>");
document.write("\\안녕하세요\\<br>");
document.write("안녕<br>하세요<br>")
console.log("안녕\n하세요");
</script>
Java
복사