Hi dear welcome to "CodePrime" Blog . In this post you are going to How to use javascript function Data Type. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat function.js file Then Copy The JS CODE and pest it. Next conect the script file with Index. 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="/js/function.js"></script>
<title>premitive data type</title>
</head>
<body>
<h2>Javascript Tutorial</h2>
<h3>By Codeprime</h3>
</body>
</html>
JAVASCRIPT CODE
function hello() {
console.log('hello');
}
hello();
//example
function product(a,b) {
return a + b;
}
let x=product(20,100);
console.log(x);
0 Comments