The code that converts a string to a numeric value and rounds it

  • 2020-03-30 01:28:54
  • OfStack

Core code:


var result = '3.1415926' | 0; // 3


Test code:



[Ctrl+A]

Related articles: