Create String object by calling its constructor: new String() : String Constructors « String « JavaScript Tutorial






<html>
<head>
<title>new String();</title>
<script type="text/javascript" language="javascript">
<!-- //
onload = function(){
    var s = new String("aaA");
    var upperCase = s.toUpperCase();
    document.write(upperCase);
}
// -->
</script>
</head>
<body>

</body>
</html>








6.3.String Constructors
6.3.1.Create String object by calling its constructor: new String()