Alshifa Hasnain has Published 283 Articles

What is the difference between JavaScript and ECMAScript?

Alshifa Hasnain

Alshifa Hasnain

Updated on 18-Mar-2025 11:15:26

5K+ Views

In this article, we will learn the difference between JavaScript and ECMAScript. JavaScript and ECMAScript are used somewhat interchangeably, but not quite. JavaScript is a general programming language in general use, and ECMAScript is its standard foundation. What is JavaScript? JavaScript was originally called LiveScript, but Netscape renamed it to ... Read More

How to create an array of integers in JavaScript?

Alshifa Hasnain

Alshifa Hasnain

Updated on 18-Mar-2025 11:14:51

18K+ Views

In this article, we will learn to create an array of integers in JavaScript. The Array parameter is a list of strings or integers. When you specify a single numeric parameter with the Array constructor, you specify the initial length of the array. The maximum length allowed for an array ... Read More

What is the difference between a method and a function?

Alshifa Hasnain

Alshifa Hasnain

Updated on 17-Mar-2025 11:59:46

7K+ Views

In this article, we will learn about the difference between a method and a function in Javascript. Method and a function are the same, with different terms. A method is a procedure or function in object-oriented programming. What is a Function? A function is a group of reusable code that ... Read More

What are some JavaScript Development Tools?

Alshifa Hasnain

Alshifa Hasnain

Updated on 17-Mar-2025 11:59:31

571 Views

One of the major strengths of JavaScript is that it does not require any expensive development tools. You can start with a simple text editor such as Notepad. Since it is an interpreted language inside the context of a web browser, you don't even need to buy a compiler. To ... Read More

3 ways to initialize an object in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 17-Mar-2025 11:59:13

9K+ Views

In Java, objects may be initialized in various ways for different purposes. When a class is implementing the Cloneable interface, it opens up one more way of creating object instances. What is Cloneable Interface? Cloneable interface in Java states that a class can clone its objects. It enables the class ... Read More

How do I hide an element when printing a web page?

Alshifa Hasnain

Alshifa Hasnain

Updated on 13-Mar-2025 12:04:52

6K+ Views

In this article, we will learn to hide an element when printing a web page in JavaScript and HTML. When printing a web page, you can suppress elements such as navigation menus, advertisements, and interactive elements that you do not require on paper and print only the required information. Different ... Read More

What are the differences between inline JavaScript and External file?

Alshifa Hasnain

Alshifa Hasnain

Updated on 13-Mar-2025 12:03:54

785 Views

The following are the differences between inline JavaScript and external files − External scripts An external JavaScript file is a separate .js file linked to an HTML document using the tag with the src attribute. The browser stores the external script once it is ... Read More

JavaScript - Create an alert on clicking an HTML button

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Mar-2025 19:33:48

4K+ Views

In this article, we will learn to create an alert by clicking an HTML button in JavaScript. JavaScript is extensively utilized to increase user interactions on web pages. One of the widespread usage scenarios is to display an alert on a button click. What is an Alert in JavaScript? ... Read More

Java program to create a TreeSet with custom Comparator

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Mar-2025 19:33:32

368 Views

In this article, we will learn to create a TreeSet with a custom Comparator in Java. TreeSet is a set that stores elements in sorted order. By default, elements are sorted in natural ordering (numbers in ascending order). Understanding TreeSet and Comparators Following are some key points for TressSet and ... Read More

Get the location of an element in Java ArrayList

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Mar-2025 19:33:17

2K+ Views

In this article, we will learn to get the location of an element in Java. In Java, an ArrayList is used for storing and manipulating dynamic collections of elements. When working with an ArrayList, you might need to find the index (position) of a specific element. What is the indexOf()? ... Read More

Advertisements