More Modern JS Coding Practice

Creating a Copy of an Array


Function Calling with Spread Operator


Concatenate Arrays with Spread Operator


Concatenate Objects with Spread Operator


Rest Parameter


 OTP Message Using Javascript String Formatting like Python String Formating


Destructing Arrays and After that getting the sum of Destruct Array 


Destructure Object Using Dot or []


Alternative of if Else for simple Problems 



Switch Operator instead of using if  else if 



Arrow Function in JavaScript


Return Object using Arrow Function


PRACTICE MODERN JS PART 3

Return a JS Factory Function to Return Object


JS constructor function to return the user object.


Person Object using Factory Function





This is how we can Update Person Details using Factory Function



Person Object Using Constructor Factory Function





This is How we can change Brand name using Constructor Factory Function


This is How we get Ratio using JS constructor Function

Find Year 


Reschedule Date Change Time


Set Expiry Date As per Mfg Date



Match Column 1 with Column 2.

Column 1 (Function Types)Column 2 (Example)
1) Function declarationA) const isEven = function(num) { return num % 2 === 0; }
2) Function expressionB) const isEven = (num) => { return num % 2 === 0; }
3) Generator functionC) function isEven(num) { return num % 2 === 0; }
4) Arrow functionD) function* isEven(num){ return num % 2 === 0; }




Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post

Contact Form