Search Stock
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 - 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."); } }
}
Developer | Milos Stankovic |
Username | milstanyu |
Uploaded | September 14, 2022 |
Rating | 3 |
Size | 1,680 Kb |
Views | 32,384 |
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!
Name | Size |
Objects | 1,936 Kb |
FUNCTIONS Intro | 2,261 Kb |
Color Guess Game | 2,795 Kb |
While loop that show n random numbers | 1,434 Kb |
How many times I used to guess number | 1,643 Kb |
Playlist - Multidimensional Array | 1,608 Kb |
Do ... While Loop | 1,742 Kb |
Null and Undefined | 1,399 Kb |
Operators | 2,079 Kb |
Responsive Menu | 2,539 Kb |
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!
Name | Username | Size |
Image grid with captions | Mchernin34 | 2,222 Kb |
CSS Parent Selector | Tomhodgins | 2,143 Kb |
Playing with transition timing | Mattgrosswork | 1,993 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Count checked checkboxes with jQuery | Mestika | 2,343 Kb |
CSS3 Diamond | Rendro | 1,960 Kb |
Free css icon set v2 - one div | Ben_jammin | 0 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
No Vacancy 404 CSS Only | Sethkontny | 0 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!