Commit 77f015ee authored by MohammadAli Keshavarz's avatar MohammadAli Keshavarz

hoisting

parent 6e145226
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>
section2
</title>
</head>
<body>
<h1>
How JS work?
<script src="script.js"></script>
</h1>
</body>
</html>
\ No newline at end of file
calculateAge(1988);
function calculateAge(year){
console.log(2018 - year);
}
var calculateAge2 = function(year){
console.log(2018-year);
}
calculateAge2(1988)
console.log(x);
var x=23
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment