https://www.w3schools.com/js/tryit.asp?filename=tryjs_datatypes_typeof_string
<!DOCTYPE html> <html> <body> <h2>JavaScript typeof</h2> <p>The typeof operator returns the type of a variable or an expression.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = typeof 5 + "<br>" + typeof "John" + "<br>" + typeof "John Doe"; </script> </body> </html> ' oppure https://www.w3schools.com/js/tryit.asp?filename=tryjs_datatypes_typeof_number <!DOCTYPE html> <html> <body> <h2>JavaScript typeof</h2> <p>The typeof operator returns the type of a variable or an expression.</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = typeof 0 + "<br>" + typeof 314 + "<br>" + typeof 3.14 + "<br>" + typeof (3) + "<br>" + typeof (3 + 4); </script> </body> </html> |