function practice()

 function hello (){

  console.log("hello")

}

hello()


// ---------------------------------------------------------------- 


function name (){

  console.log("navjot singh")

}

name()


// -------------------------------------------------------------------- 


function print (){

  for(let i = 1; i<=5; i++){

    console.log(i)

  }

}

print()


// ------------------------------------------------------------------------------ 


function practice(){

  for(let i = 1; i<10; i++){

    console.log(i)

  }

}

practice()


// --------------------------------------------------------------- 


function isa (){

  let age = 69

  if(age<18){

    console.log("you are not eligible")

  }


  else if(age>70){

    console.log("your age is old")

  }


  else{

    console.log("you are eligible")

  }

}


isa(17)


// ---------------------------------------------------------- 


// How to create odd number 1 to 100 with for loop


function num (){

  for (var i = 1; i<=100; i++){

    if(i%2!==0){

      console.log(i)

    }

  }

    

    }


// num()


// ----------------------------------------------------- 


function numb (){

  for (var i = 1; i<=100; i++){

    if(i%2==0){

      console.log(i)

    }

  }


    }


// numb()


// -------------------------------------------------------------- 




function dict (){

  const dict = {

    nav: "navjot",

    sin: "singh",

    cast: "ramgharia",

    goat: "lottey",

    pind: "bhurtley",

    jila: "sangrur",

  }

  console.log(dict.pind)

}

dict()


-------------------------------------------------------------------------



function elem (){

  alert("function call")

}




Comments

Popular posts from this blog

practice test of Arithmetic Operations: