JSFiddle - React, Tailwind, and code Playground

by shivaay123

JavaScript

function Book(name, price, pages) {
	this.name = name;
	this.price = price;
	this.pages = pages;
}

// Create an object
const book1 = new Book('Science', 20, 480);

// Display the result
document.write(book1.name);