Check out example codes for "map arduino". It will help you in understanding the concepts better.

Code Example 1

Syntax
map(value, fromLow, fromHigh, toLow, toHigh)

Parameters
value: the number to map.
fromLow: the lower bound of the value’s current range.
fromHigh: the upper bound of the value’s current range.
toLow: the lower bound of the value’s target range.
toHigh: the upper bound of the value’s target range.
  
Example:
map(val, 0, 255, 0, 1023);

Learn ReactJs, React Native from akashmittal.com