摘要:
function formatPrice(val: string | number, precision: number = 2) { if (typeof val 'string') { let num = parseFloat(val) if (isNaN(num) || num.toStrin 阅读全文
摘要:
以下是JS方法获取100以内的质数 function getPrimes(max) { const primes = []; for (let num = 2; num <= max; num++) { let isPrime = true; for (let div = 2; div * div 阅读全文