Skip to content

Commit e47ca36

Browse files
committed
merging all conflicts
2 parents bc5770a + 47d1865 commit e47ca36

File tree

108 files changed

+344
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+344
-175
lines changed

1-js/01-getting-started/4-devtools/article.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,19 @@
2929
- এখানে এরর মেসেজটি লাল রঙে দেখতে পাচ্ছেন। এক্ষেত্রে স্ক্রিপ্টটিতে একটি অজানা "lalala" কমান্ড আছে।
3030
- ডানে `bug.html:12` সোর্সটির একটি ক্লিক-উপযোগী লিঙ্ক আছে, যে লাইনে ভুলটি হয়েছে সেই লাইন নাম্বার সহ।
3131

32+
<<<<<<< HEAD
3233
এরর মেসেজটির নিচে নীল একটি `>` চিহ্ন আছে। এটি একটি "কমান্ড লাইন" নির্দেশ করে, যেখানে আপনি জাভাস্ক্রিপ্ট কমান্ড টাইপ করতে পারবেন। কমান্ডগুলো চালাতে `key:Enter` চাপুন। (মাল্টিলাইন কমান্ড দিতে `key:Shift+Enter` চাপতে হবে)
34+
=======
35+
Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them.
36+
>>>>>>> 47d186598add3a0ea759615596a12e277ce8fb5a
3337
3438
এখন আমরা এরর দেখতে পাচ্ছি। আপাতত এইটুকুই চলবে। সামনে ডেভেলপার টুল আবার আসবে। <info:debugging-chrome> অধ্যায়ে ডিবাগিং নিয়ে গভীর আলোচনা হবে।
3539

40+
```smart header="Multi-line input"
41+
Usually, when we put a line of code into the console, and then press `key:Enter`, it executes.
42+
43+
To insert multiple lines, press `key:Shift+Enter`. This way one can enter long fragments of JavaScript code.
44+
```
3645

3746
## ফায়ারফক্স, এডজ্ ও অন্যান্য
3847

@@ -50,13 +59,17 @@ Preferences খুলে "Advanced" প্যানে যান. নিচে
5059

5160
এখন `key:Cmd+Opt+C` দিয়ে কনসোল টোগল করা যাব। আর খেয়াল করুন, "Develop" নামে টপ মেনুতে নতুন একটা আইটেম এসেছে। এটাতে অনেক কমান্ড ও অপশন আছে।
5261

62+
<<<<<<< HEAD
5363
```smart header="Multi-line input"
5464
সাধারণভাবে যখন আপনি কনসোলে এক লাইন কোড দিয়ে `key:Enter` চাপেন, সেটা এক্সিকিউট হয়ে যায়।
5565
5666
একাধিক লাইন দিতে `key:Shift+Enter` চাপতে হয়। এভাবে বড় বড় জাভাস্ক্রিপ্ট কোড ইনপুট দেয়া যায়।
5767
```
5868

5969
## সারাংশ
70+
=======
71+
## Summary
72+
>>>>>>> 47d186598add3a0ea759615596a12e277ce8fb5a
6073
6174
- ডেভেলপার টুল আমাদের অনেককিছু করতে দেয়, যোমন কমান্ড চালানো, ভ্যারিয়েবল পরীক্ষা করা ইত্যাদি।
6275
- উইন্ডোজে বেশিরভাগ ব্রাউজারে `key:F12` চেপে এগুলো খোলা যায়। ম্যাকের ক্রোমে `key:Cmd+Opt+J`, সাফারিতে: `key:Cmd+Opt+C` (প্রথমে সক্রিয় করে নিতে হয়)।

1-js/02-first-steps/03-strict-mode/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ alert("some code");
4242
```warn header="`use strict` বাতিল করার কোন উপায় নেই"
4343
`"no use strict"`-র মত কোন নির্দেশক নেই যা ইন্জিনটিকে পুরনো চরিত্রে ফিরিয়ে নেবে।
4444

45+
<<<<<<< HEAD
4546
একবার স্ট্রিক্ট মোডে ঢুকে গেলে আর ফিরে যাওয়ার কোন সুযোগ থাকে না।
47+
=======
48+
Once we enter strict mode, there's no going back.
49+
>>>>>>> 47d186598add3a0ea759615596a12e277ce8fb5a
4650
```
4751
4852
## ব্রাউজার কনসোল

1-js/02-first-steps/05-types/article.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ message = 123456;
1010

1111
Programming languages that allow such things are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them.
1212

13-
There are seven basic data types in JavaScript. Here, we'll cover them in general and in the next chapters we'll talk about each of them in detail.
13+
There are eight basic data types in JavaScript. Here, we'll cover them in general and in the next chapters we'll talk about each of them in detail.
1414

15-
## A number
15+
## Number
1616

1717
```js
1818
let n = 123;
@@ -62,14 +62,33 @@ Special numeric values formally belong to the "number" type. Of course they are
6262

6363
We'll see more about working with numbers in the chapter <info:number>.
6464

65-
## A string
65+
## BigInt
66+
67+
In JavaScript, the "number" type cannot represent integer values larger than <code>2<sup>53</sup></code> (or less than <code>-2<sup>53</sup></code> for negatives), that's a technical limitation caused by their internal representation. That's about 16 decimal digits, so for most purposes the limitation isn't a problem, but sometimes we need really big numbers, e.g. for cryptography or microsecond-precision timestamps.
68+
69+
`BigInt` type was recently added to the language to represent integers of arbitrary length.
70+
71+
A `BigInt` is created by appending `n` to the end of an integer literal:
72+
73+
```js
74+
// the "n" at the end means it's a BigInt
75+
const bigInt = 1234567890123456789012345678901234567890n;
76+
```
77+
78+
As `BigInt` numbers are rarely needed, we devoted them a separate chapter <info:bigint>.
79+
80+
```smart header="Compatability issues"
81+
Right now `BigInt` is supported in Firefox and Chrome, but not in Safari/IE/Edge.
82+
```
83+
84+
## String
6685

6786
A string in JavaScript must be surrounded by quotes.
6887

6988
```js
7089
let str = "Hello";
7190
let str2 = 'Single quotes are ok too';
72-
let phrase = `can embed ${str}`;
91+
let phrase = `can embed another ${str}`;
7392
```
7493

7594
In JavaScript, there are 3 types of quotes.
@@ -78,7 +97,7 @@ In JavaScript, there are 3 types of quotes.
7897
2. Single quotes: `'Hello'`.
7998
3. Backticks: <code>&#96;Hello&#96;</code>.
8099

81-
Double and single quotes are "simple" quotes. There's no difference between them in JavaScript.
100+
Double and single quotes are "simple" quotes. There's practically no difference between them in JavaScript.
82101

83102
Backticks are "extended functionality" quotes. They allow us to embed variables and expressions into a string by wrapping them in `${…}`, for example:
84103

@@ -102,12 +121,12 @@ alert( "the result is ${1 + 2}" ); // the result is ${1 + 2} (double quotes do n
102121
We'll cover strings more thoroughly in the chapter <info:string>.
103122

104123
```smart header="There is no *character* type."
105-
In some languages, there is a special "character" type for a single character. For example, in the C language and in Java it is `char`.
124+
In some languages, there is a special "character" type for a single character. For example, in the C language and in Java it is called "char".
106125
107126
In JavaScript, there is no such type. There's only one type: `string`. A string may consist of only one character or many of them.
108127
```
109128

110-
## A boolean (logical type)
129+
## Boolean (logical type)
111130

112131
The boolean type has only two values: `true` and `false`.
113132

@@ -198,6 +217,8 @@ typeof undefined // "undefined"
198217

199218
typeof 0 // "number"
200219

220+
typeof 10n // "bigint"
221+
201222
typeof true // "boolean"
202223

203224
typeof "foo" // "string"
@@ -223,12 +244,12 @@ The last three lines may need additional explanation:
223244
2. The result of `typeof null` is `"object"`. That's wrong. It is an officially recognized error in `typeof`, kept for compatibility. Of course, `null` is not an object. It is a special value with a separate type of its own. So, again, this is an error in the language.
224245
3. The result of `typeof alert` is `"function"`, because `alert` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That's not quite correct, but very convenient in practice.
225246

226-
227247
## Summary
228248

229-
There are 7 basic data types in JavaScript.
249+
There are 8 basic data types in JavaScript.
230250

231-
- `number` for numbers of any kind: integer or floating-point.
251+
- `number` for numbers of any kind: integer or floating-point, integers are limited by ±2<sup>53</sup>.
252+
- `bigint` is for integer numbers of arbitrary length.
232253
- `string` for strings. A string may have one or more characters, there's no separate single-character type.
233254
- `boolean` for `true`/`false`.
234255
- `null` for unknown values -- a standalone type that has a single value `null`.

0 commit comments

Comments
 (0)