Sravani S has Published 86 Articles

How to get base 2 logarithm of E in JavaScript?

Sravani S

Sravani S

Updated on 16-Jan-2020 07:29:51

212 Views

To get base 2 logarithms of E, use the Math LOG2E property. It returns base 2 logarithm of E which is approximately 1.442.ExampleYou can try to run the following code to get base 2 logarithms of E in JavaScript:           JavaScript Math LOG2E Property     ... Read More

How to append an item into a JavaScript array?

Sravani S

Sravani S

Updated on 13-Jan-2020 10:22:22

169 Views

To append an item to a JavaScript array, use the push() method.ExampleYou can try to run the following code to append an item:Live Demo                    var arr = ["marketing", "technical", "finance", "sales"];          arr.push("HR");          document.write(arr);           Outputmarketing,technical,finance,sales,HR

How to use typeof with arguments in JavaScript?

Sravani S

Sravani S

Updated on 09-Jan-2020 06:28:04

674 Views

Arguments object is the arguments passed to a function. It is a variable accessible for all functions. Let’s say two arguments are passed to a function, then you can access them like the following:arguments[0] arguments[1]In the same way, you can use a type of with arguments in JavaScript. Firstly, let’s ... Read More

Why are "continue" statements bad in JavaScript?

Sravani S

Sravani S

Updated on 08-Jan-2020 10:20:39

553 Views

The usage of “continue” statement makes the code difficult to understand. In most cases, the usage of continue would mean you have an insufficient condition in your loop. To avoid this, you can add it to the condition itself or use if in a loop.But, “continue” is bad if it ... Read More

How JavaScript was created?

Sravani S

Sravani S

Updated on 02-Jan-2020 08:00:13

103 Views

NCSA’s Mosaic was the first popular browser, which released in 1993. After a year, in 1994, Netscape was founded, which came with the web browser Netscape Navigator It gained a lot of popularity in the 1990s. Many Mosaic authors worked for Navigator.Considering the need for users and market trend, Netscape ... Read More

Which equals operator (== vs ===) should be used in JavaScript comparisons

Sravani S

Sravani S

Updated on 12-Sep-2019 07:10:20

85 Views

Double equals (==) is abstract equality comparison operator, which transforms the operands to the same type before making the comparison.For example, 4 == 4     // true '4' == 4   // true 4 == '4'   // true 0 == false // trueTriple equals (===) are strict equality ... Read More

Splitting and uploading extremely large files to Amazon S3

Sravani S

Sravani S

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

425 Views

For storing extremely large files on Amazon S3, the configured virtual machine can be used which would be 10+ GB in size.In HTML5 file API, very large files are divided into small bits on the client. The server has the responsibility to join files together and move the complete file ... Read More

What is the difference between size and capacity of a Vector in Java?

Sravani S

Sravani S

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

2K+ Views

The size of a vector represents the number of components in the vector. The capacity of a vector represents the maximum number of elements the vector can hold.Example:import java.util.*; public class VectorDemo {    public static void main(String args[]) {       Vector v = new Vector(3, 2); ... Read More

What does the method addLast(E e) do in java?

Sravani S

Sravani S

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

126 Views

The addLast(E e) method of the java.util.LinkedList class inserts the specified element at the end of this list.Example:import java.util.*; public class LinkedListDemo {    public static void main(String[] args) {       LinkedList list = new LinkedList();       list.add("Hello");       list.add(2);       list.add("Chocolate");   ... Read More

How to convert a comma separated String into an ArrayList in Java?

Sravani S

Sravani S

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

7K+ Views

To convert a comma separated String into an ArrayListSplit the String into an array of Strings using the split() method.Now, convert the obtained String array to list using the asList() method of the Arrays class.Example Live Demoimport java.util.Arrays; import java.util.List; public class Sample {    public static void main(String[] args) ... Read More

Advertisements