- 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
319 Views
In javascript, we can split a string in 3 ways. One is an old way in which string.split() method is used and later on, ES6 has provided 2 more ways to split a string. In the first way spread operator is used and in the second way array.from() method is used. Let's ... Read More
vineeth.mariserla
144 Views
Swapping variables has become very easy with destructuring. In contemporary javascript swapping takes place by using another variable. It may not be hectic but it is lengthy. But in modern javascript there is no need for the third variable. Let's discuss it in detail.Example-1In the following example, swapping has done using another variable ... Read More
vineeth.mariserla
104 Views
We can attach two strings using the concat() method. But if we need to attach a specific string at the starting of the first string then the easiest way is string.padStart(). This method not only adds the second string at the start of the first string but also looks after the ... Read More
vineeth.mariserla
1K+ Views
Yes, it is possible to change the content of the HTML in javascript. Usually HTML content will be in HTML tags such as , , etc. In javascript, we have DOM methods that have an ability to access the HTML tags. Those methods, such as document.getElementById(), document.getElementByTagName(), etc., make use ... Read More
vineeth.mariserla
2K+ Views
The length property is only applicable to arrays and strings. So when we call the length property on an object we will get undefined.ExampleLive Demo var object = {prop:1, prop:2}; document.write(object.length); OutputundefinedWhereas arrays and strings will display their length when length property is used on them.ExampleLive Demo var ... Read More
vineeth.mariserla
206 Views
We can define a property of an object using Dot and Bracket notations. There is also another way in which a property called Object.defineProperty() is used to define a property. It usually takes 3 parameters they are object name, property name, property descriptor.syntaxObject.defineProperty(object name, property name, property descriptor)Lets' define a property with this ... Read More
vineeth.mariserla
214 Views
Re-declaring a variable will not destroy the value of a variable, until and unless it is assigned with some other new value.If we look at the following example variables "x" and ''y'' were assigned with values 4 and 8 respectively, later on when those variables were reassigned, the old values were replaced ... Read More
vineeth.mariserla
6K+ Views
To convert a string in to function "eval()" method should be used. This method takes a string as a parameter and converts it into a function.syntaxeval(string);ExampleIn the following example, in a string itself, a property called 'age' is assigned with a function. Later on, using eval() function the property age is converted into ... Read More
vineeth.mariserla
311 Views
To delete a property of an object, delete key word should be used. Delete key word can be used with both the methods such as Dot method and Bracket method.syntaxdelete object.property;ExampleIn the following example initially when the property "country" is executed its value "England" is displayed in the output. But when that ... Read More
vineeth.mariserla
232 Views
To convert a string in to date object Date() method should be used. This method creates a date instance that represents a single moment in time in a platform-independent format.ExampleIn the following example a string named "str" is initially parsed using JSON.parse() method and then converted in to date object ... Read More