![codeprime,codeprime js,javascript,javascript tutorial for beginners,javascript tutorial,javascript in bangla,javascript array methods tutorial,javascript array tutorial in bangla,programming tutorial javascript,array,javascript filter method,javascript array filter,javascript filter tutorial,javascript array tutorial in hindi,javascript tutorial in hindi,javascript crash course,javascript youtube tutorial,javascript webdevelopment,javascript basics,js,function, coding tutorial, how to learn coding easy way to learn coding](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj15PmdDj82aGf3HtNbvP7um2P3ZvSo9DWACwTzw8eSqG1uiSRDg2FTkdS4sh6eLxSEuLJ2MKUbVsgEyPkKRMEvYITnatdxvQSIAyvMsmNq5OVd_Mdee4EPhQbYmEthFv68CjEPvvoXWgMNyL3s5AYCkuF5CPg7q7i8yKXpZ-rKtOVb_xgu7rNA1xLanw/s1600/javascript%20array%20methods%20filter%28%29.png)
Hi dear welcome to "CodePrime" Blog . In this post you are going to learn . First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat filter.js file Then Copy The JS CODE and pest it then open the index.html file with your browser.
HTML
<!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="/filter.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 ages = [50,100,19,20,17];
document.write(ages + "<br><br>");
var b = ages.filter(checkAdults);
document.write(b + "<br><br>");
function checkAdults (age){
return age >= 18;
}
0 Comments