The modern mode, "use strict" by sjsakib · Pull Request #12 · javascript-tutorial/bn.javascript.info
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mentioned some minor changes. fixed these comments and commit again. thanks
| অনেক লম্বা সমায় ধরে কোন কম্প্যাটিবিলিট ইস্যু ছাড়াই জাভাস্ক্রিপ্টের পর্যায়ক্রমিক উন্নতি হয়েছে। ভষাটিতে নতুন নতুন ফিচার যোগ করা হত, পুরনো ফাংশনালিটি বদলাত না। | ||
|
|
||
| That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript's creators got stuck in the language forever. | ||
| এর একটি সুবিধা ছিল যে, কখনোই পুরনো কোড নস্ট হত না, মানে পুরনো কোডও নতুন জাভাস্ক্রিপ্ট ভার্সনে চলত। তবে অসুবিধা হল জাভাস্ক্রিপ্টের উদ্ভাবকদের করা কোন ভুল বা ত্রুটিপূর্ণ সিদ্ধান্ত চিরতরে ভাষটাটিতে থেকে যেত। |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ভাষটাটিতে => ভাষাটিতে
| এর একটি সুবিধা ছিল যে, কখনোই পুরনো কোড নস্ট হত না, মানে পুরনো কোডও নতুন জাভাস্ক্রিপ্ট ভার্সনে চলত। তবে অসুবিধা হল জাভাস্ক্রিপ্টের উদ্ভাবকদের করা কোন ভুল বা ত্রুটিপূর্ণ সিদ্ধান্ত চিরতরে ভাষটাটিতে থেকে যেত। | ||
|
|
||
| This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most such modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`. | ||
| ২০০৯ সালে ECMAScript 5 (ES5) আসার আগ পর্যন্ত এভাবেই চলছিল। ES5 ভাষাটিতে নতুন কিছু ফিচার যোগ করার পাশাপাশি পুরনো কিছু ফিচারও পরিবর্তন করে করে। পুরনো কোড সচল রাখতে এই পরিবর্তনগুলোর বেশিরভাগই ডিফল্টভাবে বন্ধ রাখা হয়। একটি বিশেষ নির্দেশক `"use strict"` ব্যবহার করে এগুলো আলাদাভাবে সক্রিয় করতে হয়। |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
২০০৯ সালে ECMAScript 5 (ES5) আসার আগ পর্যন্ত এভাবেই চলছিল। ES5 ভাষাটিতে নতুন কিছু ফিচার যোগ করার পাশাপাশি পুরনো কিছু ফিচারও পরিবর্তন করে করে।
এখানে করে শব্দটি একবার ব্যবহার হবে।
| ``` | ||
|
|
||
| We will learn functions (a way to group commands) soon. Looking ahead, let's note that `"use strict"` can be put at the beginning of the function body instead of the whole script. Doing that enables strict mode in that function only. But usually, people use it for the whole script. | ||
| শিঘ্রই আমরা ফাংশন (কামান্ড গ্রুপ করার একটি উপায়) শিখব। একটু এগিয়ে গিয়ে নোট করে নেয়া যাক, `"use strict"` কোন ফাংশনের বডির শুরুতেও দেয়া যায়। এতে করে শুধু ঐ ফাংশনে স্ট্রিক্ট মোড সক্রিয় হয়। তবে সাধারণত পুরো স্ক্রিপ্টের জন্যই স্ট্রিক্ট মোড ব্যবহার করা হয়। |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
কামান্ড should be কমান্ড
| `"no use strict"`-র মত কোন নির্দেশক নেই যা ইন্জিনটিকে পুরনো চরিত্রে ফিরিয়ে নেবে। | ||
|
|
||
| Once we enter strict mode, there's no return. | ||
| একবার স্ট্রিক্ট মোডে ঢুকে গেলে আর কোন ফিরে যাওয়া নেই। |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
একবার স্ট্রিক্ট মোডে ঢুকে গেলে আর কোন ফিরে যাওয়া নেই।
এই ব্যাকটি - একবার স্ট্রিক্ট মোডে ঢুকে গেলে আর ফিরে যাওয়ার কোন সুযোগ থাকে না।
| 2. Strict mode is enabled by placing `"use strict"` at the top of a script or function. Several language features, like "classes" and "modules", enable strict mode automatically. | ||
| 3. Strict mode is supported by all modern browsers. | ||
| 4. We recommended always starting scripts with `"use strict"`. All examples in this tutorial assume strict mode unless (very rarely) specified otherwise. | ||
| ১. `"use strict"` নির্দেশকটি বিল্ট-ইন ফিচারগুলোর চরিত্র বদলে ইন্জিনকে "আধুনিক" মোডে নিয়ে যায়। পরব্তী আমরা এর বিস্তারিত দেখব। |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
পরব্তী should be পরবর্তীতে