menu

JavaScript

A community to get help with JavaScript, find jobs, outsource and much more!

Channels
# All channels
view-forward
# General
view-forward
# Jobs
view-forward
# Node.js
view-forward
# React
view-forward
# Snippets
view-forward
# Vanilla
view-forward
# Vue.js
view-forward
Team
Posts
Members
Info

URL Regex but don't match markdown link

Hey! Running into a problem where I need to regex out links from a string unless they're inside a parenthesis. Can anyone pass some help or the regex lol I made a test for reference https://regex101.com/r/RaRHDO/2

thumbsup
0
message-simple
2

Cant set innerHTML!!! What's going on?

hey guys, so i am able to console.log the data which i want and thats not a problem, but i cant not set innerHtml in a div which i selected.. below is the code. /Show Details/ function showDetails(customer, id) { …

thumbsup
0
message-simple
1

Checking order of the properties of an object: Jest

I am trying to write a few test cases where I am comparing source and result object. Even thought the object looks same, it sometimes throws test case failures because of the order of the properties. Is there a matcher that does not consider this order? Sandbox:…

thumbsup
0
message-simple
1

Asynchronous behavior in JavaScript through setTimeout

Hi, I'm new to JavaScript and I'm trying to understand the asynchronous behavior here. Most of the examples I have referred to use setTimeout function to explain the concept of async. I have the following questions regarding the setTimeout function How does setTimeout makes a…

thumbsup
0
message-simple
2

Based on a key , adding array of objects to a complex object

I have a complex object where some array of objects that needs to be added ( grouping based on field and adding) The format of both is shown below I want the output to be of following format: …

thumbsup
0
message-simple
31

Javascript: Pagination

I have to get from the to indices of the records. Ideas would be appreciated data : [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] …

thumbsup
0
message-simple
7

Have someone tried sending javascript function over API

As an example: at frontend i would like to receive JSON of available fields in form, and extra parameter in JSON will be logic how to calculate them. { "fields":[{name:"field1",type:"number"},{name:"field2",type:"number"}],"calculation":(field1,field2)=> (field1/100)+field2} …

thumbsup
0
message-simple
3
·318d·Locked# Vanilla

MutationObserver effected by console?

Hey guys I am trying to use MutationObserver (https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to check if the classname of a node changes. However, the change will happen in the by putting the command in the console, do you think this will still work after the…

thumbsup
0
message-simple
2

Object to array (retaining key)

Hello, I have an object similar to: What I would like is this: How could I achieve this with ES6/7, and without Lodash?

thumbsup
0
message-simple
7

Lexical Environment Issue

PROBLEM 1: ES5 way function works, but why ES6 arrow function s doesn't work? PROBLEM 2: How can I see result of queue[] by console.log(queue) it both for ES5 & ES6. I tried to bind this with it. Still confused how to solve.

thumbsup
0
message-simple
1