The Daily Gazette accepts classified ads in several categories. For most ads, the newspaper charges 10

cents per word for the first 50 words, and 8 cents per word for every word after that. Design a java script for a program that accepts data about an ad: customer name, ad category (for example,
Apartment for rent), and number of words. Display all the input data and the price for the ad.

Sure! Here's an example code in JavaScript that accepts data about an ad, calculates the price based on the given criteria, and displays the input data along with the calculated price:

```javascript
// Accept input data
var customerName = prompt("Enter customer name:");
var adCategory = prompt("Enter ad category:");
var numberOfWords = parseInt(prompt("Enter number of words:"));

// Calculate price
var basePrice = 0.1; // 10 cents per word for the first 50 words
var additionalPrice = 0.08; // 8 cents per word after 50 words
var totalPrice;

if (numberOfWords <= 50) {
totalPrice = basePrice * numberOfWords;
} else {
var additionalWords = numberOfWords - 50;
totalPrice = (basePrice * 50) + (additionalPrice * additionalWords);
}

// Display input data and price
console.log("Customer Name: " + customerName);
console.log("Ad Category: " + adCategory);
console.log("Number of Words: " + numberOfWords);
console.log("Price: $" + totalPrice.toFixed(2));
```

To run this code, you can either create an HTML file and include the JavaScript code within the `<script>` tags, or run it in a JavaScript runtime environment such as Node.js.

When you run the code, it will prompt you to enter the customer name, ad category, and number of words for the ad. After providing the input, it will display the input data along with the calculated price for the ad. The price will be displayed with 2 decimal places.