Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f82048a

Browse files
Added introduction
1 parent b87b64c commit f82048a

File tree

2 files changed

+77
-13
lines changed

2 files changed

+77
-13
lines changed

‎README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,28 @@ This repository contains Vanilla JavaScript topics and their notes to learn from
77
 
88

99
## ☰ CONTENTS
10+
[Introduction:](./introduction.md)
11+
- [What is Vanilla JavaScript?](./introduction.md#-what-is-vanilla-javascript)
12+
- [What is the need for it?](./introduction.md#-what-is-the-need-for-it)
13+
- [Getting Started](./introduction.md#-getting-started)
14+
1015
### Fundamentals
11-
1. Basic Syntax:
12-
- Variables
13-
- var
14-
- let
15-
- const
16-
- Data types
17-
- primitive data types
18-
- numbers
19-
- strings
20-
- booleans
21-
- null
22-
- undefined
23-
- symbols
16+
1. [Basic Syntax:](./docs/basic-syntax.md)
17+
- [Variables](./docs/variables.md)
18+
- [var](./docs/variables.md#-var)
19+
- [let](./docs/variables.md#-let)
20+
- [const](./docs/variables.md#-const)
21+
- [Data types](./docs/data-types.md)
22+
- [primitive data types](./docs/data-types.md#primitive-data-types)
23+
- [numbers](./docs/data-types.md#-numbers)
24+
- [strings](./docs/data-types.md#-strings)
25+
- [booleans](./docs/data-types.md#-booleans)
26+
- [null](./docs/data-types.md#-null)
27+
- [undefined](./docs/data-types.md#-undefined)
28+
- [symbols](./docs/data-types.md#-symbols)
29+
- [non-primitive data types](./data-types.md#-non-primitive-data-types)
30+
- [Arrays](./data-types.md#-arrays)
31+
- [Objects](./data-types.md#-objects)
2432
- Operators
2533
- Arithmetic
2634
- Comparison

‎introduction.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## ⚑ Introduction
2+
This introduction will give explanation about creating and using JavaScript in the HTML.
3+
4+
### ✦ What is Vanilla JavaScript?
5+
Vanilla JavaScript is the pure, original version of JavaScript, without any additional frameworks or libraries. It's the basic and foundation for many modern web technologies are built.
6+
7+
### ✦ What is the need for it?
8+
* **Understanding the Basics:** Learning Vanilla JavaScript will provides a strong foundation for understanding about How web pages are work? and How it interact with users?.
9+
* **Flexibility:** Vanilla JavaScript offers maximum control and flexibility for building the custom solutions tailored to meet specific needs.
10+
* **Compatibility:** It's compatible with all modern web browsers, ensuring that script works across different devices and platforms.
11+
12+
### ✦ Getting Started:
13+
1. **Text Editor:** Choose a text editor or professional code editors..
14+
2. **HTML File:** Create a new HTML file (e.g., `index.html`) and open it in your text editor.
15+
3. **Basic Structure:** Add the basic HTML structure:
16+
17+
```html
18+
<!DOCTYPE html>
19+
<html>
20+
<head>
21+
<title>My First JavaScript Page</title>
22+
</head>
23+
<body>
24+
<h1 id="heading"></h1>
25+
<script src="script.js"></script>
26+
</body>
27+
</html>
28+
```
29+
30+
4. **Create JavaScript File:** Create a new JavaScript file (e.g., `script.js`) and link it to your HTML file using the [`<script>`](https://github.com/ag-sanjjeev/HTML-Notes/blob/master/tags/script-tag.md) tag.
31+
32+
**Example:**
33+
```javascript
34+
// Variables
35+
let message = "Hello, World!";
36+
37+
// DOM Manipulation
38+
let heading = document.getElementById("heading");
39+
heading.textContent = message;
40+
```
41+
42+
5. **Running JavaScript:**
43+
- Then **`select the html file`** and run by hitting the **`ENTER`** button
44+
- Or by **`open`** or by **`open with`** option menu associated with that selected file.
45+
- After that above actions will be reflected on the web browser.
46+
47+
6. **Best Practices:**
48+
- Instead of js files, You can directly write JavaScript for the HTML document via [Script Tag](https://github.com/ag-sanjjeev/HTML-Notes/blob/master/tags/script-tag.md).
49+
- The best practice is, Write separate file for JavaScript file to make HTML document clean and neat in the code. And also it gives the code re-usability.
50+
51+
---
52+
[&#8682; To Top](#-introduction)
53+
54+
[&#10094; Previous Topic](./README.md)&emsp;[Next Topic &#10095;](./topics.md)
55+
56+
[&#8962; Goto Home Page](./README.md)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /