Hello Kirupa,
I am referring your book on Absolute Beginner’s Guide to JavaScript
Chapter 3 - Functions
I’m doing exactly the same as per instructions given in the book but I am not getting any result when I go live on visual studio code. there is no dialog box.
Please help me.
Here is my code from VS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Get Distance</title>
<style>
</style>
</head>
<body>
<script>
function getDistance(speed, time) {
let distance = speed * time;
return distance;
}
let myDistance = getDistance(10, 5);
</script>
</body>
</html>