Javascript Node Js basic to Advance
1.09K subscribers
4 photos
1 video
2 files
39 links
Javascript Node Js group

@LogicB_Support
@BCA_MCA_BTECH
Download Telegram
// #1 for show print any value

console.log("Hello, world!");

// first js program @JsCode0
1
// #2 declaration of variables

let a = 1 // block scoped variable

var b = 2 // accessible from other blocks{}

const c = 3 // constant variable
// it insures that program will not assign any value to it again

console.log("var1: " + a);

console.log("var2: " + b);

console.log("var3: " + c);

// @JsCode0
👍3
// #3 Taking input in node js

const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});

readline.question("Enter a number: ", (num) => {
console.log("You entered: " + num);
});

// @jsCode0
1
// #4 Js list (array) for storing many values

// storing 3 values
let jsArr = [2, 4, 6]

// showing first value
console.log( jsArr[0] )

// @jsCode0
1
// #5 Js function

// js function which takes any value and shows them
function show(value){
console.log(value)
}

// call show function with hello value
show("Hello")

// @jsCode0
Comment here👇👇
// #5 Js function

// js function which takes any value and shows them
function show(value){
  console.log(value)
}

// call show function with hello value
show("Hello")

// @jsCode0
// strings declaration in js

let str = "its js strings"

console.log(str)
// integer declaration in js

let num = 76

console.log(num)