Posts

Date object in Javascript

Date object in Javascript --It is a built-in object that represents a specific moment in time. You can create new instances of the `Date` object to work with different dates and times. --For example, you can create a new `Date` object using the `new` keyword:  let currentDate = new Date(); console.log(currentDate)         //2024-04-09T08:03:06.697Z With the above example we can display the current date JavaScript counts months from  0  to  11 : January = 0 . December = 11 . 7 numbers specify year, month, day, hour, minute, second, and millisecond (in that order): let birthday= new Date( 2004 , 5 , 25 , 8 , 30 ); console.log(birthday) Some getter setter methods in javascript console.log(birthday.getFullYear()); console.log(birthday.getDate()); console.log(birthday.getMonth()); console.log(birthday.getDay()); console.log(birthday.getHours()); console.log(birthday.getMinutes()) console.log(birthday.getSeconds()) /* Output: 2004 25 5 5 8 30 0...

String in Javascript

  String in Javascript --String is a primitive data type in javascript unlike other languages like java let str= "Hello world" ; console.log( typeof (str));   //output : string let str1= new String( "hellooooo" ); console.log( typeof (str1));   //output : object --However when we use its methods it treat itself as an object on a temporary basis in some cases that means it is using --the concept boxing or wrapping(process of converting primitive datatype to reference dt temporarily) --Once the operation is complete, the string goes back to being a primitive value Example:   let upper=str.toUpperCase(str); console.log(upper); //output : HELLO WORLD console.log( typeof (upper)); //output : string Some Examples of String Methods: //some other methods of string console.log(str.toLowerCase());             //hello world console.log(str.length);   //11 console.log(str.indexOf( 'Hello' ));         //0 console.log(st...

Must know programming concepts

 Must know concepts of programming and development

5 valuable tips to help you maintain consistency in your work.

Image
  5 valuable   tips to help you maintain consistency in your work . Welcome back, everyone! Today, we're going to talk about an essential aspect ,maintaining consistency.  So, let's dive into 5 valuable tips to help you maintain consistency in your work . Tip number one : Establish clear goals and a schedule . Setting specific and achievable goals is crucial to maintain consistency. Write down what you want to accomplish and create a realistic timeline. Having a schedule helps you stay organized and ensures that you allocate dedicated time for your work." Tip number two : Create an organized workspace . A clean and organized workspace sets the stage for consistent work habits. Tip number three : Manage your time effectively . Prioritize your tasks and allocate time for each one. Set deadlines for yourself and stick to them. Avoid multitasking as it can lead to fragmented work and reduced productivity. Remember, being mindful of your time helps you stay consistent and ach...