Skip to content

Commit 74d26eb

Browse files
committed
start-coding
1 parent 18b993e commit 74d26eb

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

02. Start Coding/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
</head>
8+
<body>
9+
<h1 id="showMessage"></h1>
10+
<script>
11+
// print message
12+
// window.alert("Bismillahir Rahmanir Rahim")
13+
// alert("Let Start");
14+
// document.write("I am Learning JavaScript");
15+
16+
// document.getElementById("showMessage").innerHTML = "I am Learning JavaScript";
17+
// console.log("I am Learning JavaScript");
18+
</script>
19+
20+
<!-- link javacript file -->
21+
<script src="js/script.js"></script>
22+
23+
</body>
24+
</html>

02. Start Coding/js/script.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// print a MessageChannel(Show output)
2+
console.log("Bimillahir Rahmanir Rahim");
3+
4+
console.log("starting code");
5+
6+
//we can not using same qutation in another qutation for printing
7+
console.log("hello, 'Bnaglades'");
8+
console.log('hello, "Bnaglades"');
9+
10+
// Resulting an error
11+
// console.log("hello, "Bangladesh"")
12+
13+
/*Multiline
14+
Comment*/
15+
16+
// single line Comment
17+
18+
19+
// JavaScript User Input
20+
// Use prompt function for user input
21+
// Declare variables
22+
var x;
23+
x = prompt("Enter Your Name:");
24+
console.log(x);

02. Start Coding/note.html

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Java Script Basics</title>
8+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
9+
<link rel="stylesheet" href="css/style.css">
10+
<style>
11+
* {
12+
margin: 0;
13+
padding: 0;
14+
}
15+
</style>
16+
</head>
17+
18+
<body>
19+
20+
<div class="container">
21+
<div class="row">
22+
<h4 class="fs-4 mt-4">JavaScript Ouput</h4>
23+
<p>In JavaScript, "output" generally refers to the way the language produces or displays results from code
24+
execution. There are several ways to generate output in JavaScript, depending on the context:</p>
25+
<!-- <ol style="margin-left: 20px;">
26+
<li>Console Output()</li>
27+
<li>JavaScript is the world's most popular programming language. </li>
28+
<li>JavaScript is clientside scripting Language</li>
29+
<em>JavaScript is known as a client-side scripting language because it primarily runs in the user's web
30+
browser rather than on the web server.</em>
31+
</ol> -->
32+
<p><b>1. Console Output: </b> console.log(): This method prints messages or values to the browser's
33+
developer console. It is mainly used for debugging.</p>
34+
<p class="m-0"><b>Example:</b></p>
35+
<code class="mb-3">
36+
console.log("Hello, World!");
37+
</code>
38+
39+
<p><b>2. Web Page Output: </b>document.write(): This method writes directly to the HTML document. It's
40+
generally not recommended for modern web development because it can overwrite the entire page content if
41+
used after the page has loaded.</p>
42+
<p class="mb-0"><b>Example:</b></p>
43+
<code class="mb-3">
44+
document.write("Hello, World!");
45+
</code>
46+
47+
48+
<p><b>3. DOM Manipulation: </b> JavaScript can be used to modify HTML elements to display output on the
49+
webpage.</p>
50+
<p class="mb-0"><b>Example:</b></p>
51+
<code class="mb-3">
52+
document.getElementById("output").innerHTML = "Hello, World!";
53+
</code>
54+
55+
<p><b>4. Alert Boxes: </b> alert(): This method displays a message in a dialog box with an OK button. It’s a
56+
simple way to display output but interrupts user interaction with the page. </p>
57+
<p class="mb-0"><b>Example:</b></p>
58+
<code class="mb-3">
59+
document.getElementById("output").innerHTML = "Hello, World!";
60+
</code>
61+
62+
<p>Use <code>script</code> tag for writng javacript code in html</p>
63+
64+
65+
</div>
66+
67+
68+
</div>
69+
70+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
71+
<p></p>
72+
</body>
73+
74+
</html>

0 commit comments

Comments
 (0)