Skip to content

Commit 47afa87

Browse files
committed
1.02.05: start
1 parent 9da8a25 commit 47afa87

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Data types
1+
# Tipe data
22

3-
A variable in JavaScript can contain any data. A variable can at one moment be a string and at another be a number:
3+
Variabel di JavaScript bisa mengandung data apapun. Satu variabel awalnya string bisa berubah jadi angka:
44

55
```js
66
// no error
77
let message = "hello";
88
message = 123456;
99
```
1010

11-
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.
11+
Bahasa pemrograman yang memperbolehkan hal semacam ini dibsebut "dynamically typed", yang artinya ada tipe data, tapi variabel tak terikat ke tipe data apapun.
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+
Ada tujuh tipe data dasar di JavaScript. Di sini, kita akan mengcover mereka secara umum dan di bab berikutnya kita akan berbicara tentang setiap dari mereka secara detil.
1414

15-
## A number
15+
## Angka
1616

1717
```js
1818
let n = 123;
1919
n = 12.345;
2020
```
2121

22-
The *number* type represents both integer and floating point numbers.
22+
Tipe *angka* merepresentasikan baik angka integer maupun floating point.
2323

24-
There are many operations for numbers, e.g. multiplication `*`, division `/`, addition `+`, subtraction `-`, and so on.
24+
Ada banyak operasi untuk angka, misal perkalian `*`, pembagian `/`, penambahan `+`, pengurangan `-`, dan lainnya.
2525

2626
Besides regular numbers, there are so-called "special numeric values" which also belong to this data type: `Infinity`, `-Infinity` and `NaN`.
2727

@@ -64,19 +64,19 @@ We'll see more about working with numbers in the chapter <info:number>.
6464

6565
## A string
6666

67-
A string in JavaScript must be surrounded by quotes.
67+
String di JavaScript harus dikelilingi petik.
6868

6969
```js
7070
let str = "Hello";
7171
let str2 = 'Single quotes are ok too';
7272
let phrase = `can embed ${str}`;
7373
```
7474

75-
In JavaScript, there are 3 types of quotes.
75+
Di JavaScript, ada 3 tipe petik.
7676

77-
1. Double quotes: `"Hello"`.
78-
2. Single quotes: `'Hello'`.
79-
3. Backticks: <code>&#96;Hello&#96;</code>.
77+
1. Petik ganda: `"Hello"`.
78+
2. Petik tunggal: `'Hello'`.
79+
3. Backtick: <code>&#96;Hello&#96;</code>.
8080

8181
Double and single quotes are "simple" quotes. There's no difference between them in JavaScript.
8282

0 commit comments

Comments
 (0)