Object Oriented Programming in JavaScript Part – 1

Free Web development courses with real-time projects Start Now!!

Program 1

class Test
{
           constructor()
          {
              console.log("This is constructor of class")       
          }
         static show()
         {
            console.log("This is static method of class")       
         } 
        display()
       {
         console.log("Welcome in oops programming world")   
       }
    //      addition(a,b)
    //    {
    //         let c
    //          c=a+b
    //         return c
    //    }

}

       Test.show()
  //  t=new Test()
//     t.display()
//    console.log(t.addition(50,20))

 

We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *