How to use range(module)

박주홍·2021년 5월 21일
0

It would be better exactly, if you find this in mdn

But i'm gonna show u simply how u can use range(module)

// All i will tell u is that u can find mdn




First, It would be defined with value(require)

Second, Use it.. that's it

I hope u to think why it does and use it

const { range } = require('range');

range(2, 100 + 1, 2);

// Output
// [
//   2,  4,  6,  8, 10,  12, 14, 16, 18, 20, 22,
//   24, 26, 28, 30, 32,  34, 36, 38, 40, 42, 44,
//   46, 48, 50, 52, 54,  56, 58, 60, 62, 64, 66,
//   68, 70, 72, 74, 76,  78, 80, 82, 84, 86, 88,
//   90, 92, 94, 96, 98, 100
// ]

console.log('range : ', range);
console.log('range() : ', range());

// Output
// range :  [Function: range]
// range() :  []
profile
고통없는 성장은 없다고 할 수 있겠다....

0개의 댓글