Javascript

console.log("Hello World");//normal Hello World in nodejs


let s="Hello";

console.log(s+"world");

 
//SUPPORTED VARIABLES IN NODEJS

//const

//number-int float

//string

//objrct

//null

//undefined


for(let i=0;i<3;i++)

console.log(s+"world");//display Hello World 3 times


//FUNCTIONS creating and calling

function sayHello(args="no name"){

console.log("Hello"+args);

}

 
sayHello("ramu");


let add=function(i,j){

return;

}

 
console.log(add(12,23));

 
//ARROW FUNCTION

let sub=(i,j)=> {RETURN i-j};

 
console.log(sub(78,90));

 
//

console.log(add(23,function(){

return 23-45;

}));
Posted on by