Generate Random mobile number starting with 07

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question:
Hi , I am new to Postman and I want to generate random mobile numbers starting with 7 and prefix ‘0’ .

Details (like screenshots):

I want to generate random mobile numbers starting with 7 and prefix ‘0’ .Can someone help me with this?

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

I’ve already tried:

I am new to this so I haven’t tried much…

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

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