Skip to content

Commit 81f7bc8

Browse files
committed
readme formatted and modified
1 parent deaae45 commit 81f7bc8

File tree

1 file changed

+20
-31
lines changed

1 file changed

+20
-31
lines changed

readMe.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,13 @@ console.log(shoppingCart)
379379
```
380380
#### Exercises:Arrays
381381
1. Declare an array variable name itCompanies and assign initial values Facebook, Google, Microsoft, Apple, IBM, Oracle and Amazon.
382-
1. Print the array using console.log()
382+
1. Print the array using *console.log()*
383383
1. Print the number of companies in the array
384384
1. Print out each company
385385
1. Change companies to uppercase and print them out
386386
1. Print the array like as a sentence: Facebook, Google, Microsoft, Apple, IBM,Oracle and Amazon are big IT companies.
387-
1. Sort the array using sort() method
388-
1. Reverse the array using reverse() method
387+
1. Sort the array using *sort()* method
388+
1. Reverse the array using *reverse()* method
389389

390390
## Conditionals
391391
#### If
@@ -616,41 +616,37 @@ console.log(sumArrayValues(numbers));
616616

617617
```
618618
#### Exercises:Functions
619-
1. Declare a function fullName and it print out your full name.
620-
1. Declare a function fullName and now it takes firstName, lastName as a parameter and it returns your full - name.
621-
1. Declare a function addNumbers and it takes two two parameters and it returns sum.
622-
1. Declare a function name printArray. It takes array as a parameter and it prints out each value of thearray.
623-
1. Declare a function name reverseArray. It takes array as a parameter and it returns the reverse of the arra- (dont’ use method).
624-
1. Declare a function name capitalizeArray. It takes array as a parameter and it returns the - capitalizedarray.
625-
1. Declare a function name removeItem. It returns array after removing an item
626-
1. Declare a function name addItem. It returns array after adding an item
627-
1. Declare a function name sumOfNumbers. It takes a number parameter and it adds all the numbers in that range.
628-
1. Declare a function name sumOfOdds. It takes a number parameter and it adds all the odd numbers in that - range.
629-
1. Declare a function name sumOfEven. It takes a number parameter and it adds all the even numbers in that - range.
619+
1. Declare a function *fullName* and it print out your full name.
620+
1. Declare a function *fullName* and now it takes firstName, lastName as a parameter and it returns your full - name.
621+
1. Declare a function *addNumbers* and it takes two two parameters and it returns sum.
622+
1. Declare a function name *printArray*. It takes array as a parameter and it prints out each value of thearray.
623+
1. Declare a function name *reverseArray*. It takes array as a parameter and it returns the reverse of the arra- (dont’ use method).
624+
1. Declare a function name *capitalizeArray*. It takes array as a parameter and it returns the - capitalizedarray.
625+
1. Declare a function name *addItem*. It returns array after adding an item
626+
1. Declare a function name *removeItem*. It returns array after removing an item
627+
1. Declare a function name *sumOfNumbers*. It takes a number parameter and it adds all the numbers in that range.
628+
1. Declare a function name *sumOfOdds*. It takes a number parameter and it adds all the odd numbers in that - range.
629+
1. Declare a function name *sumOfEven*. It takes a number parameter and it adds all the even numbers in that - range.
630630
1. Declare a function name . It takes a number parameter and it counts number of evens and odds in the - number.
631631
output:
632632
```she
633633
evensAndOdds(100);
634634
The number of odds are 50.
635635
The number of evens are 51.
636636
```
637-
- Declare a function name randomHexaNumberGenerator. When this function is called it generates a random hexadecimal number. The function return the hexadecimal number.
637+
- Declare a function name *randomHexaNumberGenerator*. When this function is called it generates a random hexadecimal number. The function return the hexadecimal number.
638638
output:
639639
```she
640640
console.log(randomHexaNumberGenerator());
641641
'#ee33df'
642-
console.log(randomHexaNumberGenerator());
643-
'#28def10'
644-
console.log(randomHexaNumberGenerator());
645-
'#38eeda'
646642
```
647-
- Declare a function name userIdGenerator. When this function is called it generates seven character id. The function return the id.
643+
- Declare a function name *userIdGenerator*. When this function is called it generates seven character id. The function return the id.
648644
Output:
649645
```sh
650646
console.log(userIdGenerator());
651647
41XTDbE
652648
```
653-
- Modify question number n . Declare a function name userIdGeneratedByUser. It doesn’t take any parameter but it takes two inputs using prompt(). One of the input is the number of characters and the second input is the number of ids which are supposed to be generated.
649+
- Modify question number n . Declare a function name *userIdGeneratedByUser*. It doesn’t take any parameter but it takes two inputs using prompt(). One of the input is the number of characters and the second input is the number of ids which are supposed to be generated.
654650
```sh
655651
userIdGeneratedByUser()
656652
"kcsy2
@@ -660,26 +656,19 @@ ZXOYh
660656
2Rgxf
661657
"
662658
userIdGeneratedByUser()
663-
"3RexwUqvqe
664-
rVUY6dC1il
665-
YCf88ZHuAf
666-
7JhI6Mn063
667-
mo3GYyH26O
668-
"
669-
userIdGeneratedByUser()
670659
"1GCSgPLMaBAVQZ26
671660
YD7eFwNQKNs7qXaT
672661
ycArC5yrRupyG00S
673662
UbGxOFI7UXSWAyKN
674663
dIV0SSUTgAdKwStr
675664
"
676665
```
677-
- Write a function name rgbColorGenerator and it generates rgb colors.
666+
- Write a function name *rgbColorGenerator* and it generates rgb colors.
678667
Output:
679668
```sh
680669
rgb(125,244,255)
681670
```
682-
- Write a function name displayDateTime and it display in this format: 28/08/2018 04:08
671+
- Write a function name *displayDateTime* and it display in this format: 28/08/2018 04:08
683672
- Use the new Date() object to get month, date, year, hour and minute.
684673
Output:
685674
```sh
@@ -704,7 +693,7 @@ person.live = 'Finland';
704693

705694
```
706695
#### Exercises:Objects
707-
- Create an object literal called personAccount. It has firstName, lastName, incomes, expenses properties and it has totalIncomes, totalExpenses, acountInfo,addIncome, addExpence and accountBalance methods. Incomes is a set of incomes and its description and the same for expenses.
696+
- Create an object literal called *personAccount*. It has *firstName, lastName, incomes, expenses* properties and it has *totalIncomes, totalExpenses, acountInfo,addIncome, addExpence* and *accountBalance* methods. Incomes is a set of incomes and its description and the same for expenses.
708697

709698
## Class
710699
```js

0 commit comments

Comments
 (0)