Edupala

Comprehensive Full Stack Development Tutorial: Learn Ionic, Angular, React, React Native, and Node.js with JavaScript

javascript

How to add Javascript addEventListener on BrowserEvent

The Javascript addEventListener allows us to attach an event listener to the document or a DOM element that fires whenever an event occurs. This is the best approach for handling events in Javascript, as in the old times we use to add an inline event on elements. In this article, we’ll learn how to use […]

How to use Javascript detect browser type

The window.navigator object contains information about the visitor’s browser and the Navigator interface represents the state and the identity of the user agent. We can use a navigator to query it and to register themselves to carry on some activities. Example of Javascript detect browser Let create an HTML file to demonstrate how we can […]

How to use the Javascript arrow function?

The ES6 has introduced Javascript arrow functions, it provides a cleaner syntax for declaring an anonymous function, by dropping the function keyword and return key, when the function body only has one expression. Advantages of Javascript Arrow function Arrow function are neat, clear and shorter as compare to traditional function expression. Arrow function provide concise syntax […]

Javascript array object: how to use it Methods?

The JavaScript Array class is a global object that is used in the construction of arrays. In Javascript, Arrays are listed like objects, and are remarkable flexibility. We can easily, sort, add, and remove items according to their position. Javascript Array object In Javascript array is a type of object that is used to store […]

Javascript search and sort array elements

Let’s demonstrate Javascript search and sort array elements. In this example, search match input, if it found a match then add match search query at the beginning and add remaining sort after it. Example of Javascript search and sort array elements Here is a screenshot of our Javascript search string in the array. Let first […]

Scroll to top