javascript array methods pop() pop out on January 08, 2022 Get link Facebook X Pinterest Email Other Apps javascript array methods pop() pop out 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() out </h1> <h2 id="s"></h2> <h2 id="t"></h2> <script> let fruits = ["apple","banana","gauva", "orange","mango"]; document.getElementById ("s").innerText = fruits.pop(); document.getElementById ("t").innerText = fruits; </script> </body> </html> Comments
Comments
Post a Comment