javascript Array Methods pop() on January 08, 2022 Get link Facebook X Pinterest Email Other Apps javascript Array Methods pop() Html part <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>new</title> </head> <style> body{ width: 400px; height: 400px; background-color: #333; color: #fff; margin-left: 100px; margin-top: 50px; } </style> <body> <h1>javascript Array Methods pop()</h1> <br> <h2 id="start"></h2> <h2 id="start1"></h2> <script> const fruits = ["mango", "banana","orange","apple", "papaya"]; document.getElementById("start") .innerText = fruits; fruits.pop(); document.getElementById("start1") .innerText = fruits; </script> </body> </html> Comments
Comments
Post a Comment