an algorithm that prints a graph on the console using the data (you may consider any 2D data on your own ). without any library , just focusing on the logic.
the given data .
data= [{1 : 10,
2: 20,
3: 30,
4: 40,
}].
the graph look something like this:
|
|40 *
|30 *
|20 *
|10 *
|0
|————————————————————————————————–
0 1 2 3 4 5
Nice