Is the return type of the innerHTML property of type String?

console.log(typeof eleInner);  string,
console.log(eleInner instanceof String);false
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    

HelloWorld

<script type="text/javascript"> var eleP = document.querySelector("p"); var eleInner = eleP.innerHTML; console.log(typeof eleInner); //string console.log(eleInner instanceof String); //false </script> </body> </html>

eleInner is only a value with String as the data type and does not belong to an instance of the String object.

clipboard.png


string is the built-in string type of js; String is a function.

so a value of type string is not an instance of String


this has a Lei Feng relationship with innerHTML.

  https://www.ibm.com/developer.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35f6b-2bfec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35f6b-2bfec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?