Javascript foreach()
<p id="demo"></p> <script> const numbers = [65, 44, 12, 4]; numbers.forEach(myFunction) document.getElementById("demo").innerHTML = numbers; function myFunction(item, index, arr) { arr[index] = item * 10; } </script> </body>
<p id="demo"></p> <script> const numbers = [65, 44, 12, 4]; numbers.forEach(myFunction) document.getElementById("demo").innerHTML = numbers; function myFunction(item, index, arr) { arr[index] = item * 10; } </script> </body>
Friends, just like we run crud operations in Laravel, with the help of which we insert, delete, fetch and update data in the database, in today’s video we will run…
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <h2>Basic Table</h2> <p>The .table class adds basic…
<script> $(document).ready(function(){ alert('hi'); }); </script>
addClass() - Adds one or more classes to the selected elements removeClass() - Removes one or more classes from the selected elements toggleClass() - Toggles between adding/removing classes from the selected elements css() -…
remove() - Removes the selected element (and its child elements) empty() - Removes the child elements from the selected element A. remove() <script> $(document).ready(function(){ $("button").click(function(){ $("#div1").remove(); }); }); </script> </head> <body> <div…
append() - Inserts content at the end of the selected elements prepend() - Inserts content at the beginning of the selected elements after() - Inserts content after the selected elements before() - Inserts content…