0%

Backgrounds

1
2
parseInt(0.0000005)
// 5

Explanations

parseInt accepts string as the first argument, represents the value to parse. If this argument is not a string, then it is converted to one using the ToString abstract operation.

​ In JavaScript, the number which has more than 6 zeros in front of the first non-zero digit will be displayed in scientific notation, specified by ECMA . That means , 0.00000005.toString() will return '5e-7'

​ So, the code above can be explained as following:

1
2
3
4
5
6
7
0.0000005.toString()
// '5e-7'

parseInt(5e-7)
// 5
parseInt('5e-7')
// 5

Extra

What about postive numbers ?

1
2
3
4
5
6
7
8
9
10
11
parseInt(5e7)
parseInt(50000000)
// both return 50000000

// 5e7 will not be displayed in scientific notation
5e7.toString()
// '50000000'

// '5e6' is string
parseInt('5e6')
// 5

Tips

parseInt should not be used as a substitute for Math.floor()

Traditional currency system

  1. Role of Central Banks: Central banks issue fiat currency and use tools like interest rate policies to regulate the economy.
  2. Regulation and Compliance: Financial institutions are supervised by government and regulatory bodies to ensure stability and transparency in the financial system.
  3. Credit System: The modern monetary system relies on a credit system, where individuals and businesses obtain loans and credit through banks.

It is clear that the traditional monetary system is centered around governments and central banks.

What is de-centralized

Imagine a system, where everyone can earn currency through a certain amount of labor and freely engage in transactions. In the absence of a central organization, individuals cannot deceive others to obtain currency or fabricate transactions, just like being compelled to adhere to the laws of physics.

How to solve trust problem?

PoW(Proof of Work).

How to drive miner running the server?

Bonus.

How to run one app on the blockchain?

DApp. Introduce ETH.

How to speed up the transaction?

DPoS.

How to exchange with other coins?

WBTC.

what is the cryptocurrency exchanges?