Search Stock

Size
1,680 Kb
Views
32,384

How do I make an search stock?

What is a search stock? How do you make a search stock? This script and codes were developed by Milos Stankovic on 14 September 2022, Wednesday.

Search Stock Previews

Search Stock - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Search Stock</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>

Search Stock - Script Codes JS Codes

var inStock = [ 'apples', 'eggs', 'milk', 'cookies', 'cheese', 'bread', 'lettuce', 'carrot', 'broccoli', 'pizza', 'potato', 'crackers', 'onion', 'tofu', 'frozen dinner', 'cucumber'];
var search;
function print(message) { document.write( '<p>' + message + '</p>');
}
while ( true ) { search = prompt("Search for a product in our store. Type 'list' to show all of the products and 'quit' to exit."); if( search === "quit" ) { break; } if( search === "list" ) { print( inStock.join(", ") ); //break; } else { if(inStock.indexOf(search) >= 0 && search !== "list") { print("Yes, we have " + search + " in our stock."); } else { print("Sorry, we don't have it."); } }
}
Search Stock - Script Codes
Search Stock - Script Codes
Home Page Home
Developer Milos Stankovic
Username milstanyu
Uploaded September 14, 2022
Rating 3
Size 1,680 Kb
Views 32,384
Do you need developer help for Search Stock?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Milos Stankovic (milstanyu) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!