Skip to content

Commit bed172d

Browse files
add new notes
1 parent 144aecf commit bed172d

38 files changed

+55
-8
lines changed

notes/Hindi/20-DOM.md

Whitespace-only changes.

notes/Hindi/22-hoisting.md

-2
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ function foo() {
3838
3939
foo();
4040
```
41-
42-
So when the code is executed, the function is already defined and can be called without any issues.

notes/Hindi/25-number.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ JavaScript provides several methods to convert numbers from one format to anothe
2626
1. parseInt()
2727
The parseInt() method converts a string to an integer. It parses a string argument and returns an integer value. If the string starts with a non-numeric character, it returns NaN (not-a-number).
2828

29-
Example in Hinglish:
3029
parseInt("123") // Returns 123
3130
parseInt("123.45") // Returns 123
3231
parseInt("abc123") // Returns NaN
@@ -61,7 +60,7 @@ These are some basic ways of converting numbers in JavaScript.
6160

6261
NaN stands for "Not a Number" in JavaScript. It is a special value that represents an invalid or unrepresentable numeric result.
6362

64-
In Hinglish, NaN ka matlab hai "kuch bhi nahi", yani ki agar koi number expected hai lekin usme koi invalid operations hote hai toh NaN return hota hai.
63+
NaN ka matlab hai "kuch bhi nahi", yani ki agar koi number expected hai lekin usme koi invalid operations hote hai toh NaN return hota hai.
6564

6665
For example:
6766

notes/Hindi/26-date.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ console.log(specificDateTime); // output: Fri Apr 10 2023 11:30:00 GMT+0530 (Ind
4646

4747
Is tarah se hum JavaScript mein Date object create kar sakte hain aur apne kaam ke according uska use bhi kar sakte hain.
4848

49-
### Understanding milliseconds and other units of time in javascript ? Explain in detail with example and in Hinglish language.
49+
### Understanding milliseconds and other units of time
5050

5151
Javascript me time ka istemal hum kabhi bhi kar sakte hai, lekin iske units ki samajh jaruri hai, jaise milliseconds. Milliseconds ek bahut chota unit hai, jo 1 second ke 1000 parts ko represent karta hai. Isi tarah, dusre units hai jaise seconds, minutes, hours, days.
5252

@@ -130,7 +130,7 @@ const formattedTime = today.toLocaleTimeString('hi-IN'); // formats the time as
130130

131131
Yadi aap kisi specific date ko represent karna chahte hai toh aap 'new Date()' constructor ka use kar sakte hai. Jaise ki humne upar diya hai. Iske baad aap date ke year, month, day, hour, minute aur second ka pata laga sakte hai getters ka use karke. Iske alawa aap setters ka use karke bhi ye values set kar sakte hai. Aap getTime() method ka use karke dates ke beech me arithmetic operations kar sakte hai. Finally, aap dates ko string me convert karke display kar sakte hai by using toLocaleDateString() aur toLocaleTimeString() methods.
132132

133-
### what is Date setter methods in javascript ? Explain in detail with example and in Hinglish language.
133+
### what is Date setter methods
134134

135135
Date setter methods in JavaScript are functions that allow you to set specific parts of a Date object, such as the year, month, day, hour, minute, and second.
136136

@@ -150,7 +150,7 @@ In this example, we first create a new Date object using the `new Date()` constr
150150

151151
Using these setter methods allows you to easily modify specific parts of a Date object without having to create a new Date object from scratch.
152152

153-
### what is Internationalization Dates in javascript ? Explain in detail with example and in Hinglish language.
153+
### what is Internationalization Dates
154154

155155
Internationalization of dates in JavaScript refers to the process of displaying and formatting dates according to the conventions followed by people in different regions of the world. This ensures that the date representation is easily understandable and readable by people from different cultures and languages.
156156

@@ -190,7 +190,7 @@ The resulting output might look something like this:
190190

191191
This represents the date and time in a way that is familiar and easily understandable to someone who speaks Hinglish. The weekday is spelled out in full (शुक्रवार), the month is spelled out in full (जुलाई), and the time includes the AM/PM indicator as well as the time zone (GMT+5:30).
192192

193-
### what is setTimeOut and setInterval in javascript ? Explain in detail with example and in Hinglish language.
193+
### what is setTimeOut and setInterval
194194

195195
setTimeout aur setInterval dono JavaScript mein time-based functions hote hai jo code ko delay karne ya phir repeat karna kaam karte hai.
196196

notes/Hindi/39-BOM.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
### BOM Window object
2+
3+
BOM Window object in Javascript एक global object होता है जो ब्राउज़र के विंडो को represent करता है। यह ऑब्जेक्ट सभी विंडो-related methods और properties जैसे alert(), confirm() आदि को support करता है।
4+
5+
इस ऑब्जेक्ट में बहुत सारी मेथड और प्रॉपर्टी होती हैं। कुछ उनमें से हैं:
6+
7+
- alert(): यह message box show करता है जिसमें Ok button होता है।
8+
- confirm(): यह message box show करता है जिसमें Ok और Cancel button होते हैं।
9+
- prompt(): यह message box show करता है जिसमें user से input लेता है।
10+
- window.open(): यह एक नयी विंडो open करता है।
11+
- window.close(): यह current विंडो को close करता है।
12+
- setInterval(): यह function को specific time interval में repeat करता है।
13+
- setTimeout(): यह function को specific time interval के बाद run करता है।
14+
15+
एक example के रूप में, यदि हमें उपयोगकर्ता से confirm message box के माध्यम से confirmation लेनी हो तो हम निम्नलिखित code का उपयोग कर सकते हैं:
16+
17+
```
18+
if (confirm("Are you sure you want to delete this item?")) {
19+
// delete the item
20+
} else {
21+
// do nothing
22+
}
23+
```
24+
25+
इस code में, confirm() method का उपयोग message box show करने के लिए किया गया है जो user से confirmation के बारे में पूछता है। उपयोगकर्ता जब Ok button को click करता है, तब if block में वहाँ कुछ code execute होता है और जब Cancel button को click करता है तब else block में कुछ code execute होता है।
26+
27+
### BOM History object
28+
29+
Iska upyog aap kisi bhi webpage ke history se sambandhit kaam karne ke liye kar sakte hain, jaise ki pichhli webpage par jaana ya agle webpage par jaana.
30+
31+
Here is an example of how to use the BOM History object in JavaScript:
32+
33+
```
34+
// Add a new entry to the browser history
35+
history.pushState({page: 1}, "Page 1", "?page=1");
36+
37+
// Navigate back to the previous page
38+
history.back();
39+
40+
// Navigate forward to the next page
41+
history.forward();
42+
43+
// Replace the current entry in the history with a new one
44+
history.replaceState({page: 2}, "Page 2", "?page=2");
45+
46+
// Get the number of entries in the browser history
47+
var numOfEntries = history.length;
48+
```
49+
50+
Is example mein, `pushState()` method ka upyog kiya gaya hai ek naye entry ko browser history mein add karne ke liye, `back()` method ka upyog kiya gaya hai pichhle webpage par jaane ke liye, `forward()` method ka upyog kiya gaya hai agle webpage par jaane ke liye, `replaceState()` method ka upyog kiya gaya hai current entry ko nayi entry se replace karne ke liye, aur `length` property ka upyog kiya gaya hai browser history mein maujood entries ki sankhya ko jaanne ke liye.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)