GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Functions by rskhan167 · Pull Request #75 · javascript-tutorial/hi.javascript.info Conversation
|
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| Rewrite it, to perform the same, but without `if`, in a single line. | ||
| इसे फिर से लिखें, वही प्रदर्शन करने के लिए, लेकिन बिना `if` के, एक पंक्ति में। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can we use something more explicit than प्रदर्शन ? The translation doesn't need to match word by word if it's restricting us to convey the info.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Function min(a, b) | ||
|
|
||
| Write a function `min(a,b)` which returns the least of two numbers `a` and `b`. | ||
| एक function लिखें `min(a,b)` जो कम से कम दो नंबर `a` और `b` लौटाता है। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you have a re-look at this line?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Function pow(x,n) | ||
|
|
||
| Write a function `pow(x,n)` that returns `x` in power `n`. Or, in other words, multiplies `x` by itself `n` times and returns the result. | ||
| एक function लिखें `pow(x,n)` जो `x` को `n` के शक्ति में लौटाता है। या, दूसरे शब्दों में, `x` को अपने आप से `n` गुणा से गुणा करता है और परिणाम देता है। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This line also needs to be re-looked. Let's try to use proper mathematical terms in Hindi
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| Create a web-page that prompts for `x` and `n`, and then shows the result of `pow(x,n)`. | ||
| एक वेब-पेज बनाएं जो `x` और `n` के लिए संकेत देता है, और फिर `pow(x,n)` का परिणाम दिखाता है। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
prompts is very contextual here, not sure if we should translate. Thoughts?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think you are right. It is better to keep it as is.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| [demo] | ||
|
|
||
| P.S. In this task the function should support only natural values of `n`: integers up from `1`. | ||
| नोट: इस टास्क में function को केवल `n` के प्राकृतिक मान का समर्थन करना चाहिए: `1` से ऊपर के पूर्णांक। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same as above math terms are translated as plain old english.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Functions | ||
|
|
||
| Quite often we need to perform a similar action in many places of the script. | ||
| अक्सर हमें स्क्रिप्ट के कई स्थानों पर इसी तरह की कार्रवाई करने की आवश्यकता होती है। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hindi sentence is a bit diverted from the meaning of the original sentence, that's what I feel. Can be improved.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| अक्सर हमें स्क्रिप्ट के कई स्थानों पर इसी तरह की कार्रवाई करने की आवश्यकता होती है। | ||
|
|
||
| For example, we need to show a nice-looking message when a visitor logs in, logs out and maybe somewhere else. | ||
| उदाहरण के लिए, जब कोई परिदर्शक इन करता है, लॉग आउट करता है और शायद कहीं और एक अच्छा दिखने वाला संदेश दिखाना चाहता है। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here too.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Functions प्रोग्राम के मुख्य "बिल्डिंग ब्लॉक्स" हैं। वे बिना दोहराव के कोड को कई बार कॉल करने की अनुमति देते हैं। | ||
|
|
||
| We've already seen examples of built-in functions, like `alert(message)`, `prompt(message, default)` and `confirm(question)`. But we can create functions of our own as well. | ||
| हम पहले से ही बिल्ट-इन function के उदाहरण देख चुके हैं, जैसे `अलर्ट (संदेश)`, `प्रॉम्प्ट (संदेश, डिफ़ॉल्ट)` और `पुष्टि करें (प्रश्न)`। लेकिन हम अपने स्वयं के functions भी बना सकते हैं। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Lets not translate the keywords, anyting inside '``'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Oh yes I somehow missed this
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## Function Declaration | ||
|
|
||
| To create a function we can use a *function declaration*. | ||
| ## Function घोषणा |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This should be at line no 11
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ``` | ||
|
|
||
| The `function` keyword goes first, then goes the *name of the function*, then a list of *parameters* between the parentheses (comma-separated, empty in the example above) and finally the code of the function, also named "the function body", between curly braces. | ||
| `function` कीवर्ड पहले जाता है, फिर _name of the function_ जाता है, फिर कोष्ठक के बीच _parameters_ की एक सूची (उपरोक्त उदाहरण में खाली) और अंत में function का कोड, जिसे "the function body" भी कहा जाता है , घुंघराले ब्रेसिज़ के बीच। |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why are we using a notation like - name of the function? Applies to all the places we are using it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## Function घोषणा | ||
|
|
||
| It looks like this: | ||
| function बनाने के लिए हम एक _function declaration_ का उपयोग कर सकते हैं। |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
should we translate _function declaration_ also??
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks for the review. I have made the requested changes also I have gone through |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.