JavaScript - Datatype
JavaScript
Notion : <script type="text/javascript"></script> -> this block is the JavaScript
There are 6 Basic Datatypes in JavaScript.
1. String : Text
2. number : Integer, real number
3. boolean : true, false
4. function : method
5. object : a Data and a Concept includes every function, process related to Data.
More Detail for Objects is here
https://www.geeksforgeeks.org/objects-in-javascript/
6. undefined : Nothing more Detail go this bookmark
https://codeburst.io/javascript-whats-the-difference-between-null-undefined-37793b5bfce6
alert() : A method for JavaScript
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<script type="text/javascript">
var variable;
var stringVar = "String";
var numberVar = 123;
var bolVar = true;
var functionVar = function(){}; // anonymous function
var objectVar ={};
alert(typeof stringVar);
alert(typeof numberVar);
alert(typeof bolVar);
alert(typeof functionVar);
alert(typeof objectVar);
alert(typeof alpha); //undefined
alert(typeof variable); //undefined
</script>
</head>
<body>
</body>
</html>
'JavaScript' 카테고리의 다른 글
JavaScript - Global Variable (0) | 2019.09.14 |
---|---|
JavaScript - Hoisting (0) | 2019.09.14 |
JavaScript - window.onload (0) | 2019.09.14 |
JavaScript - Escape character, Operator (0) | 2019.09.14 |
What is JavaScript? (0) | 2019.09.14 |