15004 Views
Date and Time modification is a very common part of development. In Javascript add or subtract different date parameters is as easy as other languages. We have explained different addition and Subtraction with the example below: Add or Subtract Days: const date = new Date(); const additionOfDays ...
Sheetal Kumar
Feb 28, 2020
5327 Views
In most of the places in UI you need to display date and time in your format weather API is providing date and time in MySql Format that is YYYY-MM-DD H:M. To convert this I have created a function that can be used easily in javascript without and dependency. function formatDateMysql(mysqldate) ...
Sheetal Kumar
Jan 15, 2019
10520 Views
In Javascript sometimes you need a Random Integer. Here is the best way to get Random Integer number in Javascript.   function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } Test the function: console.log("Random ...
Sheetal Kumar
Jan 07, 2019
3245 Views
When you work in JavaScript then this keyword changes the context or scope based on how it is used. So here are some examples of how to use this keyword in JavaScript. function func_1() { console.log(this); } // calling a function func_1(); // this pointing to window // as object method var ...
Sheetal Kumar
Dec 04, 2018
3258 Views
When you use loop having an iteration variable like "i" and changing the value of "i" then all the closure access same variable and the variable value changed. Here you will face the problem that all the closure will take the last value of "i". For eg. var funcs ...
Sheetal Kumar
Nov 30, 2018
8259 Views
When you are working client side (Browser) then sometimes you change the content of browser or view, and then you need to update the URL of the browser so that when user refreshes or reload the page then the same thing can be visible.  window.history have different functions to update or switch ...
Sheetal Kumar
Oct 16, 2018
3800 Views
Patterns:- All languages have patterns. In javascript pattern are long-lasting and durable  or a collection a pattern that is used to solve the problem in software design .It includes function pattern, jquery pattern, design patterns, object creation pattern etc.... Some of the pattern in javscript ...
Anamika Gupta
May 22, 2018
6203 Views
Class in javascript Classes are the function which is used to define expression and declarations. Basically  the Java script is a classless language, it supports the object.In the javascript class work in the same way like other language that's why classes are called syntactic sugar . class ...
Anamika Gupta
May 18, 2018
2835 Views
Basic of DOM DOM stands for (document object model) is used as a structure representation of HTML.It is a platform to combine the program of dynamic sites so that you can access the data and their content.It gives the structure of your site and and new design to your document.It represent the document ...
Anamika Gupta
Apr 03, 2018
2235 Views
Conditions and Comparision operator in javascript In javascript conditions and comparision operator are different from each other because of their functions actions and conditions such as. In javascript condition operator ate those operator who perform different role (action) according ...
Anamika Gupta
Mar 29, 2018
5698 Views
Number Methods In javascript method and properties contain a primitive value and it treat primitive value as a object when it execute its method and properties. Basic maths calculation with numbers in javascript const num1=100; const num2=20; let val; //Basic math with numbers val=num1 ...
Anamika Gupta
Mar 25, 2018
2308 Views
Javascript and HTML binding To insert javascript in your html page  which is very basic and easy javascript and their fundamentals First, you create a  HTML page index.html  in your IDE( i.e  webstrom, netbeans, Visual Studio etc..) . In  index.html page ...
Anamika Gupta
Mar 23, 2018
2367 Views
Array are used to store multiple value in a single variable.It can hold multiple value in one time For example:Storing the list of brand in single list of item be like this: var brand1=”lancer”; var brand2=”puma”; var brand3=”lee cooper”; var brand4=”reebok”; In a ...
Anamika Gupta
Feb 05, 2018
2284 Views
ASCII stands for American Standard Code for Information Interchange. This is a character encoding standard for data and information exchange between two devices or peripherals.  In Javascript you can get the key ASCII Value from the event: var ascii = e.keyCode;   Following ...
Sheetal Kumar
Feb 03, 2018
7254 Views
Latitude and Longitude are unit for geographical cordinates and you frequently need to pick geolocation for user profiles, outlets etc. Here we described the use of Google Geo Location API. To create map and map events first you need to register on google and take a geo location API Key. To get ...
Sheetal Kumar
Feb 03, 2018
Page 1 of 2 Pages       Total Records 16