Padding Partial String
If we want to pad the partial string, we can’t simply use padStart() to get the result.
If we want to pad the partial string, we can’t simply use padStart() to get the result.
If we want to substring to a specific character, we can’t just use substring() to get the result.
Sometimes we may get an Object with an Array on the parameter. We can use Object and Array destructuring together for the function parameter.
Sometimes we may get data by the data structure of a Recursive Object. We have to write some recursive functions to find value with these Recursive Objects.
If data is an Object, we can use Object.entries, map and join to convert Object into Query String.
As for extracting Floating-point Number to finite digit, we can use parseInt or toFixed.
We can convert from Number to String by String, toString, Type Coercion or Template String.
We can convert from String to Number by Number, parseInt, + or ~~ operator.
We often use Number Literal in Practical, not Wrapper Object of Number. We can call instance method directly on Number Literal. But why?
In addition to using Primitive for Number, we can use Primitive Wrapper Object to wrap Number.