formatNum.js 968 Bytes
// export function formatNum(str) {
//   var newStr = "";
//   var count = 0;
//   for (var i = str.length - 1; i >= 0; i--) {
//     if (count % 3 == 0 && count != 0) {
//
//       newStr = str.charAt(i) + "," + newStr;
//     } else {
//       newStr = str.charAt(i) + newStr;
//     }
//     count++;
//   }
//   str = newStr;
//   return str;
//
// }

function formatNumArr(str) {
  // console.log(typeof str)
  // console.log(str)
  var str = (str).toString();
  var newStr = "";
  var count = 0;
  for (var i = str.length - 1; i >= 0; i--) {
    if (count % 3 == 0 && count != 0) {

      newStr = str.charAt(i) + "," + newStr;
    } else {
      newStr = str.charAt(i) + newStr;
    }
    count++;
  }
  str = newStr;
  str = str.split('')
  return str;

}

function formatChanging(val) {
  console.log(val)
  let tmpHtml = '';
  for(let i=0;i<val.length;i++){
    tmpHtml += "<li>"+val[i].standard+"</li>"
  }
  return tmpHtml
}

export default {formatNumArr}