Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tropangpotchiph committed Apr 27, 2023
0 parents commit 1832665
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
31 changes: 31 additions & 0 deletions 01-variable-datatypes/01console/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Console</title>
<style>
body {
height: 100vh;
display: flex;
align-items: center;
background: linear-gradient(to top left, #0b2447, #576cbc);
}

h1 {
font-family: sans-serif;
font-size: 50px;
line-height: 1.3;
width: 100%;
padding: 30px;
text-align: center;
color: white;
}
</style>
</head>
<body>
<h1>Console</h1>
<script src="script.js"></script>
</body>
</html>
28 changes: 28 additions & 0 deletions 01-variable-datatypes/01console/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// alert("Hello from JS file");

//log a number
console.log(100);

// log string
console.log("Hello World");

//log multiple values
console.log(20, "Hello", true);

// log a variable
const x = 100;
console.log(x);

//console error & warning
console.error("Alert");
console.warn("Warning");

//log object as a table
console.table({ name: "Ryan", email: "[email protected]" });

// Group Console commands
console.group("simple");
console.log(x);
console.error("Alert");
console.warn("Warning");
console.groupEnd();

0 comments on commit 1832665

Please sign in to comment.