Vineeth.mariserla has Published 211 Answers

Explain about logical not(!) operator in detail with example in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

NOT operatorThe logical NOT operator gives true for false values and false for true values. Live DemoExample var x = 200; var y = 300; document.getElementById("logical").innerHTML = !(x < y) + "" + !(x > y); Outputfalse true

How to get the application name and version information of a browser in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Javascript has provided a navigator object with which we can find any information regarding the browser. To get the application name and version information, navigator object has provided navigator.appName() and navigator.appVersion() respectively. Let's discuss each of them individually.Application Name of the browserTo get the application name, the navigator object has provided ... Read More

Explain about add and assignment(+=) operator in detail in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

add and assignment(+=) operatorThe add and assignment(+=) operator reduces the code little bit.It may not much influential  in small codes whereas coming to long codes it's use can't be ignored. Live DemoExample    var tot = 0;    var a = [1,45,78,9,78,40];    for(var i = 0; i

What is the importance of _isEqual() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

_isEqual() _isEqual() is from the underscore and lodash library of javascript. It is used to compare javascript objects. The importance of this method is that it doesn't care about the order of properties while comparing the objects. It only checks whether the properties in the two objects are equal or not. Whereas JSON.stringify(), ... Read More

Write a number array and add only odd numbers?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Odd number summation using JavaScript. Live DemoExample var tot = 0; var a = [1,45,78,9,78,40,67,76]; for(var i = 0; i

How to modify properties of a nested object in JavaScript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

There are two methods to modify properties of nested objects. One is Dot method and the other is Bracket method. The functionality is same for both the methods, but the only difference is their notation. lets' discuss them in detail.Dot methodExampleIn the following example initially the value of property country is England. ... Read More

Write the importance of shift() method in javascript array?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

 Shift() This method is used to remove the element from an array.Moreover it is different from pop() because shift() method removes the element at the starting of the array. Live DemoExample var a = [1, 2, 3, 4, 5]; var b = ["apple", "mango", "banana", "guava", "strawberry"] a.shift(); b.shift(); ... Read More

How to display output in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

There are 4 ways to display the output in JavaScript. a) Displaying the output in HTML elements, using innerHTML attribute.  Live DemoExample document.getElementById("display").innerHTML = 10 + 10; Output20.b) Displaying the output using document.write(). Live DemoExample document.write(2 + 3); ... Read More

Write the syntax of javascript with a code to demonstrate it?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

JavaScript TagsThe html script tag wants the browser to get a script between them. We can expect the scripts to be in the following places. 1.The script can be placed in html's head tag 2.Within Html's body tag. 3.As an external file. Most importantly client side scripts such as JavaScript are placed in script ... Read More

What are the types of tags involved in javascript?

vineeth.mariserla

vineeth.mariserla

Updated on 30-Jul-2019 22:30:26

Html taga) The tag is used to define a client-side script.b) The tag  contains scripting statements or an external script file.JavaScript code must be keep in script tag.Let's see the use of the tag. For suppose declare the variable outside the script tag. Live DemoExample var ... Read More

Advertisements