Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 1.25 KB

question.md

File metadata and controls

12 lines (7 loc) · 1.25 KB

Trunc medium #template-literal

by jiangshan @jiangshanmeta

Take the Challenge

Implement the type version of Math.trunc, which takes string or number and returns the integer part of a number by removing any fractional digits.

For example:

type A = Trunc<12.34> // 12

Back Share your Solutions Check out Solutions