Snippets Collections
function lenOfNum(num) {
  num = Math.abs(num)
  if(num < 10 && num >= 0){
    return 1
  }
  let len = 0
  while(num > 1){
    num = num / 10
    len++
    }
  return len
}
double[] a = new double[n];
for (int i = 0; i <n; i++){
  a[i] = Math.random();
}
star

Tue Jun 07 2022 14:26:35 GMT+0000 (UTC)

#javascript #length #number
star

Wed Jan 26 2022 23:53:43 GMT+0000 (UTC)

#random #number

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension