From 7e830c6c5aaec7ae637b45f94a4e9eef11a77fdb Mon Sep 17 00:00:00 2001 From: Bikram Sutar <38653376+theBstar@users.noreply.github.com> Date: Thu, 16 Jul 2020 21:19:25 +0530 Subject: [PATCH 1/2] Revert "started hello world" --- 1-js/02-first-steps/01-hello-world/article.md | 83 ++++++++++--------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index 7617df69d..4343a2055 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,16 +1,18 @@ -# Hello, world! (नमस्ते दुनिया!) +# Hello, world! शिक्षण जो आप पढ़ रहे हैं, वह कोर जावास्क्रिप्ट के बारे में है, जो प्लेटफ़ॉर्म-स्वतंत्र है। इसके अलावा, आप Node.JS और इसका उपयोग करने वाले अन्य प्लेटफ़ॉर्म सीखेंगे। -लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा कम रखेंगे (जैसे `alert`) ताकि, यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तब आप ब्राउज़र जावास्क्रिप्ट सीखने में समय व्यतीत नहीं करेंगे। हम ट्यूटोरियल के [अगले भाग](/ui) में ब्राउज़र जावास्क्रिप्ट पर ध्यान केंद्रित करेंगे। +लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा रखेंगे (jase ki `alert`) यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तो न्यूनतम समय मैं उन पर समय व्यतीत न करें। दूसरी ओर, ब्राउज़र विवरण में विस्तार से बताया गया है [अगला भाग](/ui) ट्यूटोरियल का. -तो पहले यह देखते हैं कि हम किसी स्क्रिप्ट को वेबपेज से कैसे जोड़ते हैं। सर्वर-साइड वातावरण (जैसे Node.js) के लिए, आप स्क्रिप्ट को `"node my.js"` जैसे कमांड से निष्पादित कर सकते हैं। -## "स्क्रिप्ट" टैग +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"`. -जावास्क्रिप्ट प्रोग्रामों को HTML दस्तावेज़ के किसी भी भाग में ` */!* -

...स्क्रिप्ट के बाद.

+

...After the script.

@@ -34,23 +36,24 @@ ``` ```online -आप ऊपर दिए गए बॉक्स के दाएं-कोने में "प्ले" बटन पर क्लिक करके उदाहरण चला सकते हैं। +You can run the example by clicking the "Play" button in the right-top corner of the box above. ``` -`<स्क्रिप्ट>` टैग में जावास्क्रिप्ट कोड होता है जो ब्राउज़र द्वारा टैग को संसाधित (process) करने पर स्वचालित रूप से निष्पादित होता है। +The ` ``` - इस तकनीक का उपयोग आधुनिक जावास्क्रिप्ट में नहीं किया जाता है। ये टिप्पणियां जावास्क्रिप्ट कोड को उन पुराने ब्राउज़रों से छिपाती हैं, जो '<स्क्रिप्ट>' टैग को प्रोसेस करना नहीं जानते थे। चूंकि पिछले 15 वर्षों में जारी किए गए ब्राउज़रों में यह समस्या नहीं है, इसलिए इस तरह की टिप्पणी से आप वास्तव में पुराने कोड को पहचान सकते हैं। + This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the ` ``` -यहाँ, `/path/to/script.js` यह साइट रूट से स्क्रिप्ट के लिए एक absolute (निरपेक्ष) पथ है। वर्तमान पृष्ठ से कोई एक relative (आपेक्षिक) पथ भी प्रदान कर सकता है। उदाहरण के लिए, `src="script.js"` वर्तमान फोल्डर के अंदर एक फ़ाइल `"script.js"` का अर्थ होगा। +Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. -हम एक पूर्ण URL भी दे सकते हैं। उदाहरण के लिए: +We can give a full URL as well. For instance: ```html ``` -कई स्क्रिप्ट संलग्न करने के लिए, कई टैग का उपयोग करें: +To attach several scripts, use multiple tags: ```html @@ -88,29 +91,29 @@ ``` ```smart -एक नियम के रूप में, केवल सरलतम स्क्रिप्ट HTML में डाली जाती हैं। अधिक जटिल अलग फ़ाइलों में रहते हैं। +As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. -एक अलग फ़ाइल का लाभ यह है कि ब्राउज़र इसे डाउनलोड करेगा और इसे अपने कैश में रखेगा [cache](https://en.wikipedia.org/wiki/Web_cache). +The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). -उसी स्क्रिप्ट को संदर्भित करने वाले अन्य पृष्ठ इसे डाउनलोड करने के बजाय इसे कैश से ले लेंगे, इसलिए फ़ाइल वास्तव में केवल एक बार डाउनलोड की जाती है। +Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. -यह ट्रैफ़िक कम करता है और पृष्ठों को तेज़ बनाता है। +That reduces traffic and makes pages faster. ``` -````warn header="यदि `src` सेट है, तो स्क्रिप्ट के अंदर मौजूद कोड को अनदेखा कर दिया जाता है।" -एक ``` -हमें या तो बाहरी स्क्रिप्ट का चयन करना होगा जैसे ` @@ -120,11 +123,11 @@ ``` ```` -## सारांश +## Summary -- हम एक पृष्ठ पर जावास्क्रिप्ट कोड जोड़ने के लिए एक `<स्क्रिप्ट>` टैग का उपयोग कर सकते हैं। -- `टाइप` और` भाषा` attribute की आवश्यकता नहीं है। -- एक बाहरी फाइल में लिखी गई स्क्रिप्ट को ` के साथ डाला जा सकता है। +- We can use a ``. -ब्राउज़र स्क्रिप्ट और वेबपेज के interaction (परस्पर क्रिया) के बारे में जानने के लिए बहुत कुछ है। लेकिन ध्यान रखें कि ट्यूटोरियल का यह हिस्सा जावास्क्रिप्ट भाषा के लिए समर्पित है, इसलिए हमें इसके विशिष्ट ब्राउज़र कार्यान्वयन के साथ खुद को विचलित नहीं करना चाहिए। हम जावास्क्रिप्ट को चलाने के लिए ब्राउज़र का उपयोग करेंगे, जो कई विकल्पों में से ऑनलाइन पढ़ने के लिए बहुत सुविधाजनक है। +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. From 6704b8800754d2c788949587c18ebab963239c9a Mon Sep 17 00:00:00 2001 From: Bikram Sutar <38653376+theBstar@users.noreply.github.com> Date: Thu, 16 Jul 2020 21:33:25 +0530 Subject: [PATCH 2/2] updated hello-world --- 1-js/02-first-steps/01-hello-world/article.md | 83 +++++++++---------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md index 4343a2055..7617df69d 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,18 +1,16 @@ -# Hello, world! +# Hello, world! (नमस्ते दुनिया!) शिक्षण जो आप पढ़ रहे हैं, वह कोर जावास्क्रिप्ट के बारे में है, जो प्लेटफ़ॉर्म-स्वतंत्र है। इसके अलावा, आप Node.JS और इसका उपयोग करने वाले अन्य प्लेटफ़ॉर्म सीखेंगे। -लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा रखेंगे (jase ki `alert`) यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तो न्यूनतम समय मैं उन पर समय व्यतीत न करें। दूसरी ओर, ब्राउज़र विवरण में विस्तार से बताया गया है [अगला भाग](/ui) ट्यूटोरियल का. +लेकिन, हमें अपनी स्क्रिप्ट को चलाने के लिए काम करने का environment चाहिए, और, सिर्फ इसलिए कि यह पुस्तक ऑनलाइन है, ब्राउज़र एक अच्छा विकल्प है। हम ब्राउज़र-विशिष्ट commands की मात्रा कम रखेंगे (जैसे `alert`) ताकि, यदि आप किसी अन्य environment जैसे Node.JS पर ध्यान केंद्रित करने की योजना बनाते हैं, तब आप ब्राउज़र जावास्क्रिप्ट सीखने में समय व्यतीत नहीं करेंगे। हम ट्यूटोरियल के [अगले भाग](/ui) में ब्राउज़र जावास्क्रिप्ट पर ध्यान केंद्रित करेंगे। +तो पहले यह देखते हैं कि हम किसी स्क्रिप्ट को वेबपेज से कैसे जोड़ते हैं। सर्वर-साइड वातावरण (जैसे Node.js) के लिए, आप स्क्रिप्ट को `"node my.js"` जैसे कमांड से निष्पादित कर सकते हैं। -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"`. +## "स्क्रिप्ट" टैग +जावास्क्रिप्ट प्रोग्रामों को HTML दस्तावेज़ के किसी भी भाग में ` */!* -

...After the script.

+

...स्क्रिप्ट के बाद.

@@ -36,24 +34,23 @@ For instance: ``` ```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. +आप ऊपर दिए गए बॉक्स के दाएं-कोने में "प्ले" बटन पर क्लिक करके उदाहरण चला सकते हैं। ``` -The ` ``` - This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the ` ``` -Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"` would mean a file `"script.js"` in the current folder. +यहाँ, `/path/to/script.js` यह साइट रूट से स्क्रिप्ट के लिए एक absolute (निरपेक्ष) पथ है। वर्तमान पृष्ठ से कोई एक relative (आपेक्षिक) पथ भी प्रदान कर सकता है। उदाहरण के लिए, `src="script.js"` वर्तमान फोल्डर के अंदर एक फ़ाइल `"script.js"` का अर्थ होगा। -We can give a full URL as well. For instance: +हम एक पूर्ण URL भी दे सकते हैं। उदाहरण के लिए: ```html ``` -To attach several scripts, use multiple tags: +कई स्क्रिप्ट संलग्न करने के लिए, कई टैग का उपयोग करें: ```html @@ -91,29 +88,29 @@ To attach several scripts, use multiple tags: ``` ```smart -As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. +एक नियम के रूप में, केवल सरलतम स्क्रिप्ट HTML में डाली जाती हैं। अधिक जटिल अलग फ़ाइलों में रहते हैं। -The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). +एक अलग फ़ाइल का लाभ यह है कि ब्राउज़र इसे डाउनलोड करेगा और इसे अपने कैश में रखेगा [cache](https://en.wikipedia.org/wiki/Web_cache). -Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. +उसी स्क्रिप्ट को संदर्भित करने वाले अन्य पृष्ठ इसे डाउनलोड करने के बजाय इसे कैश से ले लेंगे, इसलिए फ़ाइल वास्तव में केवल एक बार डाउनलोड की जाती है। -That reduces traffic and makes pages faster. +यह ट्रैफ़िक कम करता है और पृष्ठों को तेज़ बनाता है। ``` -````warn header="If `src` is set, the script content is ignored." -A single ` ``` -We must choose either an external ` @@ -123,11 +120,11 @@ The example above can be split into two scripts to work: ``` ```` -## Summary +## सारांश -- We can use a ``. +- हम एक पृष्ठ पर जावास्क्रिप्ट कोड जोड़ने के लिए एक `<स्क्रिप्ट>` टैग का उपयोग कर सकते हैं। +- `टाइप` और` भाषा` attribute की आवश्यकता नहीं है। +- एक बाहरी फाइल में लिखी गई स्क्रिप्ट को ` के साथ डाला जा सकता है। -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. +ब्राउज़र स्क्रिप्ट और वेबपेज के interaction (परस्पर क्रिया) के बारे में जानने के लिए बहुत कुछ है। लेकिन ध्यान रखें कि ट्यूटोरियल का यह हिस्सा जावास्क्रिप्ट भाषा के लिए समर्पित है, इसलिए हमें इसके विशिष्ट ब्राउज़र कार्यान्वयन के साथ खुद को विचलित नहीं करना चाहिए। हम जावास्क्रिप्ट को चलाने के लिए ब्राउज़र का उपयोग करेंगे, जो कई विकल्पों में से ऑनलाइन पढ़ने के लिए बहुत सुविधाजनक है।