Skip to content

Commit 927bd81

Browse files
authored
Half way through
1 parent 700ee5d commit 927bd81

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

1-js/02-first-steps/01-hello-world/article.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,49 @@
22

33
शिक्षण जो आप पढ़ रहे हैं, वह कोर जावास्क्रिप्ट के बारे में है, जो प्लेटफ़ॉर्म-स्वतंत्र है। इसके अलावा, आप Node.JS और इसका उपयोग करने वाले अन्य प्लेटफ़ॉर्म सीखेंगे।
44

5-
लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा रखेंगे (jase ki `alert`) यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तो न्यूनतम समय मैं उन पर समय व्यतीत न करें। दूसरी ओर, ब्राउज़र विवरण में विस्तार से बताया गया है [अगला भाग](/ui) ट्यूटोरियल का. (update required)
5+
लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा कम रखेंगे (जैसे `alert`) ताकि, यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तब आप ब्राउज़र जावास्क्रिप्ट सीखने में समय व्यतीत नहीं करेंगे। हम ट्यूटोरियल के [अगले भाग](/ui) में ब्राउज़र जावास्क्रिप्ट पर ध्यान केंद्रित करेंगे।
66

7+
तो पहले यह देखते हैं कि हम किसी स्क्रिप्ट को वेबपेज से कैसे जोड़ते हैं। सर्वर-साइड वातावरण (जैसे Node.js) के लिए, आप स्क्रिप्ट को `"node my.js"` जैसे कमांड से निष्पादित कर सकते हैं।
78

8-
So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`.
9+
## "स्क्रिप्ट" टैग
910

11+
जावास्क्रिप्ट प्रोग्रामों को HTML दस्तावेज़ के किसी भी भाग में `<script>` टैग की सहायता से डाला जा सकता है।
1012

11-
## The "script" tag
12-
13-
JavaScript programs can be inserted into any part of an HTML document with the help of the `<script>` tag.
14-
15-
For instance:
13+
उदाहरण के लिए:
1614

1715
```html run height=100
1816
<!DOCTYPE HTML>
1917
<html>
2018

2119
<body>
2220

23-
<p>Before the script...</p>
21+
<p>स्क्रिप्ट से पहले...</p>
2422

2523
*!*
2624
<script>
2725
alert( 'Hello, world!' );
2826
</script>
2927
*/!*
3028

31-
<p>...After the script.</p>
29+
<p>...स्क्रिप्ट के बाद.</p>
3230

3331
</body>
3432

3533
</html>
3634
```
3735

3836
```online
39-
You can run the example by clicking the "Play" button in the right-top corner of the box above.
37+
आप ऊपर दिए गए बॉक्स के दाएं-कोने में "प्ले" बटन पर क्लिक करके उदाहरण चला सकते हैं।
4038
```
4139

42-
The `<script>` tag contains JavaScript code which is automatically executed when the browser processes the tag.
43-
40+
`<स्क्रिप्ट>` टैग में जावास्क्रिप्ट कोड होता है जो ब्राउज़र द्वारा टैग को संसाधित (process) करने पर स्वचालित रूप से निष्पादित होता है।
4441

45-
## Modern markup
42+
## आधुनिक मार्कअप (markup)
4643

47-
The `<script>` tag has a few attributes that are rarely used nowadays but can still be found in old code:
44+
`<स्क्रिप्ट>` टैग में कुछ attributes (विशेषताएं) हैं जो आजकल शायद ही कभी उपयोग की जाती हैं, लेकिन अभी भी पुराने कोड में पाई जा सकती हैं:
4845

49-
The `type` attribute: <code>&lt;script <u>type</u>=...&gt;</code>
50-
: The old HTML standard, HTML4, required a script to have a `type`. Usually it was `type="text/javascript"`. It's not required anymore. Also, the modern HTML standard totally changed the meaning of this attribute. Now, it can be used for JavaScript modules. But that's an advanced topic, we'll talk about modules in another part of the tutorial.
46+
`type` attribute: <code>&lt;script <u>type</u>=...&gt;</code>
47+
: पुराने HTML संस्करण, HTML4 में स्क्रिप्ट में एका attribute `type` की आवश्यकता होती है। `type`. आमतौर पर यह `type="text/javascript"` था. इसकी अब आवश्यकता नहीं है। साथ ही, आधुनिक HTML मानक ने इस विशेषता के अर्थ को पूरी तरह से बदल दिया है। अब, इसका उपयोग जावास्क्रिप्ट मॉड्यूल के लिए किया जा सकता है। लेकिन यह एक उन्नत विषय है, हम ट्यूटोरियल के दूसरे भाग में मॉड्यूल के बारे में बात करेंगे।
5148

5249
The `language` attribute: <code>&lt;script <u>language</u>=...&gt;</code>
5350
: This attribute was meant to show the language of the script. This attribute no longer makes sense because JavaScript is the default language. There is no need to use it.
@@ -111,9 +108,9 @@ This won't work:
111108
</script>
112109
```
113110

114-
We must choose either an external `<script src="…">` or a regular `<script>` with code.
111+
हमें या तो बाहरी स्क्रिप्ट का चयन करना होगा जैसे `<script src =" ... ">` या हमें नियमित रूप से `<script>` टैग के अंदर कोड लिखना होगा।
115112

116-
The example above can be split into two scripts to work:
113+
ऊपर दिए गए उदाहरण को कार्य करने के लिए दो लिपियों में विभाजित किया जा सकता है:
117114

118115
```html
119116
<script src="file.js"></script>
@@ -123,11 +120,11 @@ The example above can be split into two scripts to work:
123120
```
124121
````
125122
126-
## Summary
123+
## सारांश
127124
128-
- We can use a `<script>` tag to add JavaScript code to a page.
129-
- The `type` and `language` attributes are not required.
130-
- A script in an external file can be inserted with `<script src="path/to/script.js"></script>`.
125+
- हम एक पृष्ठ पर जावास्क्रिप्ट कोड जोड़ने के लिए एक `<स्क्रिप्ट>` टैग का उपयोग कर सकते हैं।
126+
- `टाइप` और` भाषा` attribute की आवश्यकता नहीं है।
127+
- एक बाहरी फाइल में लिखी गई स्क्रिप्ट को `<script src ="path/to/script.js"> </script> के साथ डाला जा सकता है।
131128
132129
133-
There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many.
130+
ब्राउज़र स्क्रिप्ट और वेबपेज के interaction (परस्पर क्रिया) के बारे में जानने के लिए बहुत कुछ है। लेकिन ध्यान रखें कि ट्यूटोरियल का यह हिस्सा जावास्क्रिप्ट भाषा के लिए समर्पित है, इसलिए हमें इसके विशिष्ट ब्राउज़र कार्यान्वयन के साथ खुद को विचलित नहीं करना चाहिए। हम जावास्क्रिप्ट को चलाने के लिए ब्राउज़र का उपयोग करेंगे, जो कई विकल्पों में से ऑनलाइन पढ़ने के लिए बहुत सुविधाजनक है।

0 commit comments

Comments
 (0)