Generate Random Mobile Number Starting With 07

Hi,

I am new to Postman and I want to generate random mobile numbers starting with 7 and prefix β€˜0’. Can someone help me with this?

I am trying to test some registration thing again and again and for that every time i need to use new mobile number.

Thanks for the help !!!

The following seems to work.

for (let i = 0; i < 10; i++) {

    let randomMobile = "07" + Math.random().toString().slice(2,11);
    console.log(randomMobile);

}

Taken from…

JavaScript, Generate a Random Number that is 9 numbers in length - Stack Overflow

image

1 Like

Thanks @ mdjones, I will try this out !!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.