// console: prints
console.log("hello")
hello
// var: assigns variable
// "str" + var : prints string variable in that order
var msg="friend"; 
console.log("hello " + msg)
hello friend
// The function returns the product of p1 and p2
function myFunction(p1, p2) {
    return p1 * p2;   
  }
myFunction(3, 4)
12
// The function returns the largest number in an array
console.log(Math.max(1, 3, 2, 4, 5, 2, 9));
9
// Math.PI is equivalent to Pi, math.cos returns cosine
var pi = Math.PI;
console.log("The cosine of 2pi = "+ Math.cos(2*pi));
The cosine of 2pi = 1
// Math.floor gives value according to floor function
console.log(Math.floor(8.99999));
console.log(Math.floor(8.00001));
console.log(Math.floor(8.5555));
8
8
8