Vineeth.mariserla has Published 117 Articles

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

2K+ Views

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

113 Views

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

964 Views

_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

933 Views

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

3K+ Views

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

How to display output in javascript?

vineeth.mariserla

vineeth.mariserla

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

2K+ Views

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

115 Views

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

949 Views

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

What is the use of substr() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

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

121 Views

substr()substr() method extracts parts of a string, beginning at the character at the specified index, and returns the specified number of characters. It does not change the original string. Syntaxsubstr() method accepts two parameters one is start and other is length str.substr(start , length)Arguments   a) Start: start defines the starting index from where ... Read More

what is the use of slice() method in JavaScript?

vineeth.mariserla

vineeth.mariserla

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

132 Views

slice()The slice() method extracts a part of a string and returns the extracted part in a new string.It doesn't modify the original string.syntaxslice() takes two parameters one is starting index and the other is ending index. It's notation is given below. string.slice(string.slice(starting index, ending index))Arguments   a) starting index: It gives from ... Read More

Previous 1 ... 5 6 7 8 9 ... 12 Next
Advertisements