const faker = require('faker'); const name = faker.name.findName(); console.log(name); // output: "John Doe"
const faker = require('faker'); const email = faker.internet.email(); console.log(email); // output: "example@gmail.com"
const faker = require('faker'); const phone = faker.phone.phoneNumber(); console.log(phone); // output: "+1-202-555-0172"By using JavaScript Faker, developers can easily generate test data for their applications or mock APIs. It is a popular library used in testing frameworks such as Jest and Mocha.