USUdayraj Sawantinudayraj.sawant.com·Nov 15, 2023 · 3 min readLoops in javascriptfor loop: Single for loop: Below is the syntax of a for loop with the example of skipping the even numbers and printing the odd numbers between 1 to 10. for (let i = 0; i <=10; i++) { const element = i; if (element%2==0) { contin...00
USUdayraj Sawantinudayraj.sawant.com·Nov 13, 2023 · 5 min readFunctions in javascriptFunction declaration and accessing: In javascript, we can declare and access the function in the following way function sayMyName() { console.log("U"); console.log("D"); console.log("A"); console.log("Y"); console.log("R"); co...00
USUdayraj Sawantinudayraj.sawant.com·Nov 8, 2023 · 5 min readObjects in javascriptDeclaration of the object: In JavaScript, we can create an object by using curly braces {} and then add key-value pairs as items of the object. Key-value pairs are like pairs of name and value. The key is what you will use to access the value, and th...00
USUdayraj Sawantinudayraj.sawant.com·Nov 6, 2023 · 4 min readMath Object in javascriptMath is an object in JavaScript that provides mathematical functions and constants. There is no need to create an instance of the object we can directly access the methods of this object by simply calling it with the "." operator e.g. Math.round(x) t...00
USUdayraj Sawantinudayraj.sawant.com·Nov 5, 2023 · 5 min readDate object and its methods in javascriptDate object in js The Date object in JavaScript is used for working with dates and times. The Date object represents a specific moment in time, including the year, month, day, hour, minute, second, and milliseconds. The date object in JavaScript prov...00