Skip to main content
34 votes
16 answers
40k views

I am trying to test if the argument passed into my function is a class name so that I may compare it to other classes using instanceof. For example: function foo(class1, class2) { // Test to see if ...
1 vote
1 answer
28 views

Problem: I am trying to display a user's address from a nested user object in my React component. When the component first loads, I get an Uncaught TypeError: Cannot read properties of undefined (...
73 votes
12 answers
40k views

I noticed not all the Javascript functions are constructors. var obj = Function.prototype; console.log(typeof obj === 'function'); //true obj(); //OK new obj(); //TypeError: obj is not a constructor ...
12253 votes
51 answers
13.6m views

How do I remove a specific value from an array? Something like: array.remove(value); Constraints: I have to use core JavaScript. Frameworks are not allowed.
3 votes
3 answers
13k views

I'm having a problem with the button in my HTML5 application. When I press the button a Video player runs and plays the video that is stored locally. My issue now is that when I hold the button and ...
2 votes
1 answer
12k views

I am trying to get a click to open editable content of my dyniamically generated rows in modals, using datatables plugin. I see an error: Uncaught TypeError: Cannot read property 'display' of ...
0 votes
1 answer
3k views

I've imported both luxon and types/luxon and whenever I try and set the type to luxons 'DateTime' object I get the error DateTime: Cannot use namespace 'DateTime' as a type. Here is some example code ...
-3 votes
1 answer
79 views

I am learning web development and sometimes I get type errors when running my project. I understand that a type error usually means the program is trying to use a value in the wrong way, but I’m not ...
-3 votes
1 answer
37 views

First, I retrieve the data from the database using PHP oop called it $details. $details contain several object array totally about 7. Each object array has a PHP object fields are service_idno, ...
Best practices
1 vote
4 replies
64 views

How can i create a mini quiz app with pure vanilla JavaScript which takes questions and presents options which include the correct answer and output the scores with a next button which switches the ...
1 vote
1 answer
196 views

I have a specific type of content that has JavaScript, HTML and CSS components. I want other web sites to be able to embed this specific content on their websites and mobile-websites. How should I go ...
1 vote
4 answers
365 views

Let me explain. I am not looking for a particular attribute of a particular DOM element. I started thinking that if I checked the background-color of the body element, I would find the background ...
-1 votes
2 answers
428 views

var countries = ['Afghanistan',"Albania","Algeria"]; var Links=["http://www.google.com","http://www.yahoo.com","http://www.bing.com"]; /*initiate ...
2 votes
2 answers
688 views

I would like to create a interactive map feature via HTML, CSS and JavaScript. Therefore I need to place Link-Tags(or similar) on a map. The following image illustrates what I am trying to achieve: ...
1 vote
2 answers
9k views

How do I add a thumbnail to my web site so when a user shares the link to Twitter or Facebook it shows the link with the image in HTML and JavaScript? So what I exactly want is that when the user ...

15 30 50 per page
1
2 3 4 5
168335