영상
개념
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>문자열 대소문자 변환 - toUpperCase(),toLowerCase()</title>
</head>
<body>
<script>
/*
[개념] 문자열 대소문자 변환
(1) toLowerCase() : 문자열을 소문자로 변환해 반환한다.
(2) toUpperCase() : 문자열을 대문자로 변환해 반환한다.
*/
let text = "aBcDeFg";
let rs1 = text.toLowerCase();
let rs2 = text.toUpperCase();
document.write(rs1 + ", " + rs2);
</script>
</body>
</html>
Java
복사