코드:
결과보기 »
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>JavaScript Predefined Function</title> </head> <body> <h1>String() 함수</h1> <script> document.write(String(123) + "<br>"); document.write(String(123.456) + "<br>"); document.write(String("123") + "<br>"); document.write(String(new Date()) + "<br>"); document.write(String(null) + "<br><br>"); document.write(String(true) + "<br>"); document.write(String(false) + "<br>"); document.write(String(Boolean(1)) + "<br>"); document.write(String(Boolean(0))); </script> </body> </html>