mirror of
https://github.com/Nezumi-2711/javascript-training.git
synced 2026-09-22 20:01:31 +00:00
Init data type sample
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Javascript Training</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Javascript Training</h1>
|
||||
<script src="./index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
// Data Types
|
||||
let isBoolean = true;
|
||||
console.log(isBoolean);
|
||||
|
||||
// console.log(typeof false);
|
||||
console.log(typeof isBoolean);
|
||||
// console.log(typeof 18);
|
||||
// console.log(typeof 'String text');
|
||||
|
||||
isBoolean = "String text";
|
||||
console.log(typeof isBoolean);
|
||||
|
||||
let number = 18;
|
||||
console.log(number);
|
||||
console.log(typeof number);
|
||||
|
||||
number = 27;
|
||||
console.log(typeof number);
|
||||
|
||||
console.log(typeof null);
|
||||
|
||||
// let, const and var
|
||||
let day = 30;
|
||||
day = 31;
|
||||
|
||||
const birthYear = 2001;
|
||||
// birthYear = 1990;
|
||||
|
||||
var myJob = "Student";
|
||||
myJob = "Grab bike";
|
||||
|
||||
lastName = "Nezumi";
|
||||
console.log(lastName);
|
||||
Reference in New Issue
Block a user