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 4d949b977..0b2a6807e 100644 --- a/1-js/02-first-steps/01-hello-world/article.md +++ b/1-js/02-first-steps/01-hello-world/article.md @@ -1,17 +1,17 @@ -# Hello, world! +# வணக்கம், உலகமே! -This part of the tutorial is about core JavaScript, the language itself. +டுடோரியலின் இந்த பகுதி ஜாவாஸ்கிரிப்ட் என்கிற நிரலாக்க மொழியின் மைய்யக் கருத்துகளை பற்றியது. -But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial. +ஆனால் இந்த ஸ்கிரிப்ட்களை(அச்சுருஎழுத்து) இயக்க ஒரு செயற்பாட்டுத்தளம்(working environment) தேவைப்படுகிறது. மேலும் இந்த புத்தகம் "நேரடி இணையதளத்தில்"(online) இருப்பதால், உலாவி ஒரு சிறந்த தேர்வாகும். எனினும் உலாவிக்கு மட்டுமே பயன்படுத்தக்கூடிய கட்டளைகளின் அளவை (`alert` போன்றவை) குறைந்தபட்சமாக உபயோகப்படுத்தியுள்ளோம். இதன்மூலம் நீங்கள் மற்றொரு சூழலில் (Node.js போன்றவை) கவனம் செலுத்த திட்டமிட்டால் அவற்றில் நேரத்தை செலவிட வேண்டியதில்லை. டுடோரியலின் [அடுத்த பகுதி](/ui) -இல் ஜாவாஸ்கிரிப்ட்-ஐ உலாவியில் பயன்படுத்துவது பற்றி கவனம் செலுத்துவோம். -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"`. +எனவே முதலில், ஒரு வலைப்பக்கத்தில் ஒரு ஸ்கிரிப்டை எவ்வாறு இணைப்பது என்று பார்ப்போம். வழங்கி-உழி(Server-side) சூழல்களுக்கு (Node.js போன்றவை), நீங்கள் `"node my.js"` போன்ற கட்டளையுடன் ஸ்கிரிப்டை இயக்கலாம். -## The "script" tag +## "ஸ்கிரிப்ட்" (script) என்ற குறிச்சொல் -JavaScript programs can be inserted into any part of an HTML document with the help of the ` */!* -

...After the script.

+

...ஸ்கிரிப்டுக்குப் பிறகு.

@@ -35,24 +35,24 @@ For instance: ``` ```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. +மேலே உள்ள பெட்டியின் வலது மேல் மூலையில் உள்ள "இயக்கு" (Play) பொத்தானைக் கிளிக் செய்வதன் மூலம் உதாரணத்தை இயக்கலாம். ``` -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` என்பது தள மூலத்திலிருந்து ஸ்கிரிப்டுக்கு ஒரு முழுமையான பாதை ஆகும். ஒருவர் ஒரு பக்கத்தில் இருந்து, அந்த பக்கம் எந்த உறையில் உள்ளதோ அந்த உறையில் உள்ள மற்ற பக்கங்களை தொடர்புப் பாதையாகவும் குறிப்பிடலாம். உதாரணமாக, `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 @@ -90,29 +90,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 ` @@ -122,11 +122,11 @@ The example above can be split into two scripts to work: ``` ```` -## Summary +## சுருக்கம் -- We can use a ``. +- ஒரு பக்கத்திற்கு ஜாவாஸ்கிரிப்ட் குறியீட்டைச் சேர்க்க `` என்று குறியிடவேண்டும். -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. +உலாவி, ஸ்கிரிப்டுகள் மற்றும் வலைப்பக்கத்துடனான அவற்றின் தொடர்பு பற்றி அறியவேண்டியவை இன்னும் நிறைய இருக்கின்றது. ஆனால் டுடோரியலின் இந்த பகுதி ஜாவாஸ்கிரிப்ட் மொழிக்கு அர்ப்பணிக்கப்பட்டுள்ளது என்பதை நினைவில் கொள்வோம், எனவே உலாவி-குறிப்பிட்ட செயலாக்கங்களுடன் நாம் திசைதிருப்பக்கூடாது. ஜாவாஸ்கிரிப்டை இயக்குவதற்கான ஒரு வழியாக உலாவியைப் பயன்படுத்துவோம், இது நேரடி இணையதள வாசிப்புக்கு மிகவும் வசதியானது, அதேபோல் இது பல்வேறு முறைகளில் நமக்கு உகந்த ஒரு முறையாகும்.