Calculator Tools Calculator Tools
Create

Buggy App

Aug 1, 2025

About this app

This app showcases 4 intentional bugs and errors for demonstrative purposes.

Buggy App Welcome to the Buggy App This app demonstrates some common bugs and errors in JavaScript! Click Me for Bugs

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Buggy App</title>
<meta name="description" content="This app showcases 4 intentional bugs and errors for demonstrative purposes.">
<meta name="keywords" content="bugs, errors, javascript, web app, buggy app">

<!-- Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/fontawesome.min.css" crossorigin="anonymous">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Bug 1: Reference Error in console - variable 'undefinedVar' is not defined
console.log(undefinedVar);

// Bug 2: Misspelled function name causing an error (should be 'addNumbers')
console.log(addNmbers(5, 10)); // Uncaught ReferenceError: addNmbers is not a function

// Bug 3: Intentional infinite loop
let num = 0;
while (num < 10) {
console.log("Counting: " + num);
// increase num at some point could lead to infinite loop here!
}

// Bug 4: Attempting to execute a function that never gets defined
undefinedFunction(); // Uncaught ReferenceError: undefinedFunction is not defined
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
background-color: #f0f8ff;
color: #333;
}
h1 {
color: #3498db;
transition: color 0.3s;
}
h1:hover {
color: #e74c3c;
}
.btn-error {
background-color: #e74c3c;
color: white;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1 class="text-center mt-5">Welcome to the Buggy App</h1>
<p class="text-center">This app demonstrates some common bugs and errors in JavaScript!</p>
<div class="text-center my-5">
<button class="btn btn-error">Click Me for Bugs</button>
</div>
</div>
</body>
</html>