Most voted questions in Java

0 votes
1 answer

javascript filter array multiple conditions

You can do like this var filter = ...READ MORE

Nov 8, 2022 in Java by Damonlang
• 700 points
2,139 views
0 votes
1 answer

How to trigger a file download when clicking an HTML button or JavaScript

You can trigger a download with the ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
2,254 views
0 votes
1 answer

How to show console in jsfiddle

Normally by pressing F12 or using inspect ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
462 views
0 votes
1 answer

Refresh a page using JavaScript or HTML

window.location.reload(); in JavaScript <meta http-equiv="refresh" content="1"> in HTML ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
456 views
0 votes
1 answer

Convert GMT to IST (India Standard Time) using javascript?

You can specify an IANA time zone ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
16,451 views
0 votes
1 answer

How to filter an array from all elements of another array

This is what I would do: var arr1 = [1,2,3,4], ...READ MORE

Nov 7, 2022 in Java by Damonlang
• 700 points
3,326 views
0 votes
1 answer

How to get current formatted date dd/mm/yyyy in Javascript and append it to an input

The stringent equality operator (===) works exactly like the abstract equality operator (==), with the exception that no type conversion is performed, and the types must be the same to be regarded equal. Javascript Tutorial on Comparison Operators After performing any required type transformations, the == operator will check for equality.  Because the === operator does not perform the conversion, it will simply return false if two values are not of the same type.  Both are equally fast. "abc" == new String("abc") ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
1,047 views
0 votes
1 answer

What does the function then() mean in JavaScript?

The then() method is similar to "Javascript ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
570 views
0 votes
1 answer

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

I hope this is what you're looking for: const today = new Date(); const yyyy = ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
270 views
0 votes
1 answer

Base64 encoding and decoding in client-side Javascript

Some browsers, including Firefox, Chrome, Safari, Opera, ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
531 views
0 votes
1 answer

How to decode jwt token in javascript without using a library?

Working unicode text JWT parser function: function parseJwt ...READ MORE

Nov 4, 2022 in Java by Damonlang
• 700 points
6,312 views
0 votes
0 answers

What 'type' of Language is JavaScript?

The structure of programming languages is frequently ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
358 views
0 votes
0 answers

What is the difference between "let" and "var"?

Although I've heard that it's referred to ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
375 views
0 votes
0 answers

How to convert decimal to hexadecimal in JavaScript

In JavaScript, how do you translate decimal ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
341 views
0 votes
0 answers

Generating random whole numbers in JavaScript in a specific range

How can I create random whole numbers ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
411 views
0 votes
0 answers

Generating PDF files with JavaScript

I was hoped that I could accomplish ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
288 views
0 votes
0 answers

What does document.forms mean in javascript?

What do the terms document.cookie, document.forms, and.value ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
333 views
0 votes
0 answers

Generate random number between two numbers in JavaScript

Is it possible to use JavaScript to ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
439 views
0 votes
0 answers

send images on whatsapp web with javascript DOM

I currently have the script that delivers ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
1,287 views
0 votes
0 answers

How to filter object array based on attributes?

The real estate house objects in my ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
364 views
0 votes
0 answers

Define a global variable in a JavaScript function

Can a global variable be defined in ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
342 views
0 votes
0 answers

How to sort an array of integers correctly

Trying to retrieve the greatest and lowest ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
416 views
0 votes
0 answers

What is event bubbling and capturing?

What is the distinction between event bubbling ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
236 views
0 votes
0 answers

creating list of objects in Javascript

Is it feasible to make a list ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
233 views
0 votes
0 answers

What is property in hasOwnProperty in JavaScript?

Consider: if (someVar.hasOwnProperty('someProperty') ) { // Do something(); } ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
260 views
0 votes
0 answers

How to add a class to a given element?

I already have a class for an element: <div class="someclass"> <img ... ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
192 views
0 votes
0 answers

window.onload vs document.onload

Which is more popular: window.onload or document.onload? READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
227 views
0 votes
0 answers

What is VanillaJS?

I have a simple query that has ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
449 views
0 votes
0 answers

How do I replace all occurrences of a string in JavaScript?

Given a string: s = "Test abc test ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
366 views
0 votes
0 answers

How to write palindrome in JavaScript

I'm wondering how to construct a palindrome ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
256 views
0 votes
0 answers

How do I copy to the clipboard in JavaScript?

How can I copy text to the ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
523 views
0 votes
0 answers

JavaScript Array splice vs slice

What is the distinction between splice and ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
342 views
0 votes
0 answers

Page Redirect after X seconds wait using JavaScript

After displaying an error notice, I need to redirect to a specified URL after 5 seconds.  First, I utilized Javascript as seen below. document.ready(window.setTimeout(location.href = "https://www.google.co.in",5000)); However, it is not ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
941 views
0 votes
0 answers

What is the difference between ' and " in JavaScript?

When creating strings in JavaScript, the character'or ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
232 views
0 votes
0 answers

How to play audio?

I'm creating a game using HTML5 and ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
198 views
0 votes
0 answers

How do I check if an array includes a value in JavaScript?

What is the shortest and most efficient ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
418 views
0 votes
0 answers

What is the !! (not not) operator in JavaScript?

I encountered some code that appears to ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
224 views
0 votes
0 answers

What is lexical scope?

What is a concise overview of lexical ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
224 views
0 votes
0 answers

How do you reverse a string in-place in JavaScript?

Without utilizing built-in methods (.reverse(),.charAt(), etc.), how ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
265 views
0 votes
0 answers

How to convert an Object {} to an Array [] of key-value pairs in JavaScript

I'd want to transform the following object: {"1":5,"2":7,"3":0,"4" ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
844 views
0 votes
0 answers

Convert javascript array to string

I'm attempting to loop through a "value" ...READ MORE

Sep 28, 2022 in Java by Nicholas
• 7,760 points
286 views
0 votes
0 answers

Javascript call() & apply() vs bind()?

I'm already aware that apply and calls are functions that do the same thing (context of a function). The distinction is in how we communicate the arguments (manual vs array). When should I, however, utilize the bind() method? var obj = { x: ...READ MORE

Sep 22, 2022 in Java by Nicholas
• 7,760 points
328 views
0 votes
0 answers

How to convert a string to an integer in JavaScript?

In JavaScript, how do I convert a ...READ MORE

Sep 22, 2022 in Java by Nicholas
• 7,760 points
300 views
0 votes
0 answers

What does [object Object] mean? (JavaScript)

One of my notifications had the follo ...READ MORE

Sep 22, 2022 in Java by Nicholas
• 7,760 points
308 views
0 votes
0 answers

Remove duplicate values from JS array

I have a pretty simple JavaScript arr ...READ MORE

Sep 22, 2022 in Java by Nicholas
• 7,760 points
451 views
0 votes
0 answers

What is lexical scope?

What is a quick overview of lexical ...READ MORE

Sep 22, 2022 in Java by Nicholas
• 7,760 points
321 views
0 votes
0 answers

How do I format a date in JavaScript?

How can I convert a Date object ...READ MORE

Sep 21, 2022 in Java by Nicholas
• 7,760 points
273 views
0 votes
0 answers

For-each over an array in JavaScript

How can I use JavaScript to loop ...READ MORE

Sep 21, 2022 in Java by Nicholas
• 7,760 points
292 views
0 votes
0 answers

Javascript require() function giving ReferenceError: require is not defined

Essentially, I'm using javascript to scrape data from the Google Play store by: 1-Request 2-Cheerios 3-QueryString I used Google Market API from Github ...READ MORE

Sep 21, 2022 in Java by Nicholas
• 7,760 points
316 views
0 votes
0 answers

How can I remove a specific item from an array?

How do I get rid of a specific value from an array?  As an example: array.remove(value); // removes all elements with ...READ MORE

Sep 21, 2022 in Java by Nicholas
• 7,760 points
313 views