Skip to content

Commit 998ec9b

Browse files
committed
fixed headings
1 parent 1edd9c6 commit 998ec9b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

docs/en/numbers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## INTEGERS (NAMBA) AND FLOATS (DESIMALI)
1+
# INTEGERS (NAMBA) AND FLOATS (DESIMALI)
22

33
Integers and floats are the basic numeric data types in Nuru, used for representing whole numbers and decimal numbers, respectively. This page covers the syntax and usage of integers and floats in Nuru, including precedence, unary increments, shorthand assignments, and negative numbers.
44

5-
### PRECEDENCE
5+
## PRECEDENCE
66

77
Integers and floats behave as expected in mathematical operations, following the BODMAS rule:
88
```go
@@ -14,7 +14,7 @@ fanya b = 3/5
1414
a + b // 2.8
1515
```
1616

17-
### UNARY INCREMENTS
17+
## UNARY INCREMENTS
1818

1919
You can perform unary increments (++ and --) on both floats and integers. These will add or subtract 1 from the current value. Note that the float or int have to be assigned to a variable for this operation to work. Here's an example:
2020

@@ -24,7 +24,7 @@ fanya i = 2.4
2424
i++ // 3.4
2525
```
2626

27-
### SHORTHAND ASSIGNMENT
27+
## SHORTHAND ASSIGNMENT
2828

2929
Nuru supports shorthand assignments with +=, -=, /=, *=, and %=:
3030
You
@@ -38,7 +38,7 @@ i -= 10 // 93
3838
i %= 90 // 3
3939
```
4040

41-
### NEGATIVE NUMBERS
41+
## NEGATIVE NUMBERS
4242

4343
Negative numbers also behave as expected:
4444

docs/en/operators.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## OPERATORS
1+
# OPERATORS
22
Operators are the foundation of any programming language, allowing you to perform various operations on variables and values. This page covers the syntax and usage of operators in Nuru, including assignment, arithmetic, comparison, member, and logic operators.
33

4-
### ASSIGNMENT
4+
## ASSIGNMENT
55

66
Assuming `i` and `v` are predefined variables, Nuru supports the following assignment operators:
77

@@ -17,7 +17,7 @@ For `strings`, `arrays` and `dictionaries`, the `+=` sign operator is permissibl
1717
list1 += list2 // this is equivalent to list1 = list1 + list2
1818
```
1919

20-
### ARITHMETIC OPERATORS
20+
## ARITHMETIC OPERATORS
2121

2222
Nuru supports the following arithmetic operators:
2323

@@ -28,7 +28,7 @@ Nuru supports the following arithmetic operators:
2828
- `%`: Modulo (ie the remainder of a division)
2929
- `**`: Exponential power (eg: `2**3 = 8`)
3030

31-
### COMPARISON OPERATORS
31+
## COMPARISON OPERATORS
3232

3333
Nuru supports the following comparison operators:
3434

@@ -39,7 +39,7 @@ Nuru supports the following comparison operators:
3939
- `<`: Less than
4040
- `<=`: Less than or equal to
4141

42-
### MEMBER OPERATOR
42+
## MEMBER OPERATOR
4343

4444
The member operator in Nuru is `ktk`. It will check if an object exists in another object:
4545
```go
@@ -49,15 +49,15 @@ fanya majina = ['juma', 'asha', 'haruna']
4949
"halima" ktk majina // sikweli
5050
```
5151

52-
### LOGIC OPERATORS
52+
## LOGIC OPERATORS
5353

5454
Nuru supports the following logic operators:
5555

5656
- `&&`: Logical `AND`. It will evaluate to true if both are true, otherwise it will evaluate to false.
5757
- `||`: Logical `OR`. It will evaluate to false if both are false, otherwise it will evaluate to true.
5858
- `!`: Logical `NOT`. It will evaluate to the opposite of a given expression.
5959

60-
### PRECEDENCE OF OPERATORS
60+
## PRECEDENCE OF OPERATORS
6161

6262
Operators have the following precedence, starting from the highest priority to the lowest:
6363

0 commit comments

Comments
 (0)