function NumberOf1Between1AndN_Solution(n) { // write code here let arr =[]; let point = 0; let ret = 0; while(n-point>0){ arr.push(n-point); point++; } arr.join('').split('').forEach(item=>{ if(item === '1'){ ret++ } }) return ret } module.exports = { NumberOf1Between1AndN_Solution : NumberOf1Between1AndN_Solution };