Passing values in the foreground and background of Js

the integer passed to the foreground by the background (for example, 1234) the foreground needs to be displayed as a string, for example, 0 corresponds to "available" 1 corresponds to "unavailable" and so on. Modify that the background still receives an integer

Mar.21,2021
The

shaping calls the .toString () method to convert numbers to strings; the
string calls the Number () method to convert strings into numbers.
it is recommended that after getting the data, traverse the data (for example, map () ), and process it again when uploading.
this is a very stupid and basic method. You are welcome to add it downstairs.

Menu