HEADER ADS 728X90

JavaScript Array Method - forEach() Function | Javascript Tutorial:34 | BY CodePrime

css,html,php,javascript,tutorial,code prime,codeprime js,javascript tutorial by codeprime,javascript tutorial for beginners,javascript array methods,javascript tutorial in hindi,programming tutorial javascript,javascript crash course,javascript tutorial,learn javascript,javascript basics,javascript foreach in hindi,foreach method,javascript tutorial for beginners 2022,javascript tutorial for beginners full course,javascript crash course 2022,forEach,js,loop, coding tutorial, how to learn coding easy way to learn coding

Hi dear welcome to "CodePrime" Blog . In this post you are going to learn JavaScript Array Method - forEach() Function | Javascript Tutorial:34 | BY CodePrime. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat foreach.js file Then Copy The JS CODE and pest it then open the index.html file with your browser.

HTML CODE

<!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">
    <script src="/foreach.js"></script>
    <title>javascript</title>
</head>
<body>
    <br><br>
    <h2>Javascript Tutorial <br>By Codeprime</h2>
   
   

</body>

<style>
    h2{
        color:#fff;
        background-color: #000;
        padding: 5px;
    }
</style>
</html>





JAVASCRIPT CODE

var a = ["Rubia", "Hanif", "Hassan", "Abbas"];

a.forEach(print);

function print (value, index){
    document.write( index + ": " + value + "<br>");
}

Youtube Tutorial

FLOW US ON SOCIAL MEDIA

Post a Comment

0 Comments

Join Telegram