- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Vineeth.mariserla has Published 117 Articles
vineeth.mariserla
4K+ Views
Differences between Map and WeakMapThe functional mechanism of Map and WeakMap is same but they have little differences.1) A WeakMap accepts only objects as keys whereas a Map, in addition to objects, accepts primitive datatype such as strings, numbers etc.2) WeakMap objects doesn't avert garbage collection if there are no ... Read More
vineeth.mariserla
71 Views
Accessing Property Of An ObjectWithout objects there is no JavaScript. Everything such as boolean, numbers, functions etc are all objects.Accessing properties of an object is explained in the following method.Example-1 Live Demo myObj = {"name":"Ramesh", "age":30, "family": [{"mother":"Geetha", "father":"Rao"}], "city":"Berlin"}; ... Read More
vineeth.mariserla
2K+ Views
Non-enumerable propertyObjects can have properties that don't show up when iterated through the particular object using Object.keys() or for...in loop.Those type of properties are called as non-enumerable properties.Creating a non-enumerable propertyTo create a non-enumerable property we have to use Object.defineProperty() method. This a special method to create non-enumerable properties in ... Read More
vineeth.mariserla
150 Views
JSON.stringify()If we need to send data to a web server the data should be a string.To change the object literal to string JSON.stringify() method should be used.For instanceExample-1 Live Demo var obj = {name:"rekha", age:40, city:"newyork"}; var myJSON = JSON.stringify(obj); ... Read More
vineeth.mariserla
225 Views
There are two methods to merge properties of javascript objects dynamically. They are1) Object.assign() The Object.assign() method is used to copy the values of all properties from one or more source objects to a target object. It will return the target object.Example-1 Live Demo var target = ... Read More
vineeth.mariserla
128 Views
JSON.parse()When the data is received from web server, the data is always a string .So to change it to the object, JSON.parse() method is used. Example Live Demo var obj = '{"name":"Jon", "age":20, "city":"Columbia"}'; var res = JSON.parse(obj); document.write(res); console.log(res); output[object object] {"name":"Jon", ... Read More
vineeth.mariserla
7K+ Views
Removing HTML tags from a stringWe can remove HTML/XML tags in a string using regular expressions in javascript. HTML elements such as span, div etc. are present between left and right arrows for instance , etc. So replacing the content within the arrows, along with the arrows, with nothing('') can ... Read More
vineeth.mariserla
1K+ Views
Pass by value In pass by value, a function is called by directly passing the value of the variable as the argument. Changing the argument inside the function doesn’t affect the variable passed from outside the function. Javascript always pass by value so changing the value of the variable never changes the ... Read More
vineeth.mariserla
105 Views
Math.trunc()Unlike Math.floor(), Math.ceil() and Math.round(), Math.trunc() method removes fractional part and gives out only integer part. It doesn't care about rounding the number to the nearest integer. It doesn't even notice whether the value is positive or negative. Its function is only to chop up the fractional part.syntaxMath.trunc(x);parameters - Math.trunc() takes a number as an ... Read More
vineeth.mariserla
499 Views
GeneratorsJavaScript supports Generator functions and Generator Objects. A generator function is the same as a normal function, but whenever it needs to generate a value it uses the 'yield' keyword rather than 'return'. The 'yield' keyword halts the function execution and sends a value back to the caller. It has ... Read More