Posts

Template strings in javascript (understanding ES6)

Image
 Template strings in javascript (understanding ES6) Template strings are basically the latest way of concatenating strings or be it functions and has come alive with the ES6 version of ecmaScript. So let us understand how we use Template String to concatenate or join two given strings before ES6 and once it has come: < script >      var  FirstName =  "Praveen" ;      var  MiddleName =  "Kumar" ;      var  LastName =  "Yadav" ;     document.write( ` ${ FirstName }   ${ MiddleName }   ${ LastName } ` );     console.log( ` ${ FirstName }            ${ MiddleName }              ${ LastName } ` );         // OLD WAY OF CONCATINATION OF STRINGS              /*  document.write(FirstName + MiddleName + LastName);         console.log(FirstName + MiddleName + LastName);     */ </ script > OUTPUT: TEMPLATE STRING IN JAVASCRIPT ES6 VERSION So with this example we understood that to use template string we have to use backlash followed by curly braces  `{}`

Use of Let, Var and Const in Javascript along with their Scopes

Image
 Use of Let, Var and Const in Javascript along with their Scopes The data type "var" can be used to redeclare or assign a variable n number of times without any troubles. But the data type "Let" can be initialised only once and cannot be initialized again and again. However it can be assigned n number of times but it cannot be initialised. What i essentially mean can be understood with the below given example: CASE 1 ( VAR Data type): Var Name = "Rishu";  // here i have initialised my variable "Name" and declared its value as                                               //   well as "Rishu"; Var Name = "Calc";    // re initialized the value of Name as "Calc"  console.log(Name);     // It will print Calc without any error CASE 2 ( Let Data type): Let Name = "Rishu";  // here i have initialised my variable "Name" and declared its value as                                                 //   well as

Arrow function example in Javscript

Image
 Arrow function example

getAttribute and setAttribute() in Javscript

Image
 getAttribute and setAttribute() in Javascript

HISTORY OBJECT ALONG WITH ITS PROPERTIES AND METHODS

Image
HISTORY OBJECT ALONG WITH ITS PROPERTIES AND METHODS

Replace method in window property inside Javascript

Image
 Replace method in window property inside JavaScript

scrollTo and scrollBy in Javsscript

Image
 scrollTo and scrollBy in Javsscript

resizeBy and resizeTo window property in Javascript

Image
 resizeBy and resizeTo window property in Javascript

moveTo() and moveBy() using window in Javascript

Image
 moveTo() and moveBy() using window in Javascript

HOW TO OPEN AND CLOSE WINDOW USING WINDOW OBJECT IN JAVASCRIPT

Image
 HOW TO OPEN AND CLOSE WINDOW USING WINDOW OBJECT IN JAVASCRIPT

Window Height and Window Width methods under BOM manipulation in Javscript

Image
 Window Height and Window Width methods under BOM manipulation in Javscript

SetTimeout() and ClearTimeout()

Image
 SetTimeout() and ClearTimeout()

setInterval() and clearInterval() in Javascript

Image
 setInterval() and clearInterval() in Javascript

Form validation Complete in Javascript

Image
COMPLETE FORM VALIDATION USING JAVASCRIPT

Email Validation under Form validation in Javascript

Image
  <! DOCTYPE   html > < html   lang = "en"   id = "hello" > < head >    < meta   charset = "UTF-8" >    < meta   name = "viewport"   content = "width=device-width, initial-scale=1.0" >    < meta   http-equiv = "X-UA-Compatible"   content = "ie=edge" >    < title > Email Validation under Form validation in Javascript </title >    < link   rel = "stylesheet"   href = "latesttest.css" > </ head > < body >        < form   onsubmit = "   return   validation () " >           EMAIL ID  < input   id = "user"   type = "email"   placeholder = "EMAIL ID"   required >< br >< br >           PASSWORD  < input   id = "pass"   type = "password"   placeholder = "PASSWORD" >< br >< br >            < button   type = "submit" >