如何将科学记数法转换为带有Kotlinlang中位的正则小数

时间:2019-08-31 11:17:39

标签: kotlin

我正在尝试遍历地图。但是它用科学计数法转换了我的十进制数。

let obj = {
  1: 'one',
  2: 'two',
  3: 'three',
  7: 'seven'
};

// make sure that your case is in order

// get keys of your object
const keys = Object.keys(obj);

// find index of starting key
const index = keys.indexOf('3');

// make sure index >= 0

// each all keys from starting key to the end by old school way
for (let i = index; i < keys.length; i++) {
  var key = keys[i];
  console.log(obj[key]);
}

如何将其转换为带位置的常规小数 请帮忙。

0 个答案:

没有答案