(PCC)::[How-A-variable-without-a-value-returns-the-value-undefined-in-JavaScript]::[js]
<!DOCTYPE html> <html> <body> <h2>JavaScript Variables</h2> <p>A variable declared without a value will have the value undefined.</p> <p id="demo"></p> <script> var carName; document.getElementById("demo").innerHTML = carName; </script> </body> </html>
A variable declared without a value will have the value undefined.