Questions tagged as 'javascript'

2
answers

I get an error in the code

In the code that is inside the if it does not work but when I take it out and put the code in the console it works, someone who can help me there:     
asked by 22.09.2018 / 08:43
2
answers

Array problems with localStorage

var x2=x1+c; var x2i=x2.toFixed(2); var y2=y1+ci; var y2i=y2.toFixed(2);//52.23 var arrayX2=new Array(); arrayX2.push(y2i); var arrayX2=new Array(); arrayX2.push(y2i); By entering the element the array alert gives me 1 (CORRECT) alert(arrayX...
asked by 26.09.2018 / 11:33
1
answer

How to pass data obtained from js to an input of html?

Well my question for some will be basic but it turns out that I am doing a program that increases a button pressed, all right up to here, the problem is that    I want that increment to be printed in an html input since this   I'm doing it wi...
asked by 01.10.2018 / 05:08
1
answer

Navigating a JSON

I want to take the information of this json ( link ) and show them in an HTML and show me only the data of the team that it has as clantag TRCIO, until now I have managed to show me the data, but it shows me those of all the equipment. How could...
asked by 05.10.2016 / 15:38
1
answer

Indicator of web-connected headphones

How can I know if I have headphones connected to my computer? My goal is to get it using HTML5 + JavaScript. The next page shows all the audio output devices, but there is no way to know if the active device is about headphones or not. li...
asked by 07.10.2016 / 12:53
3
answers

Alternative to .replace () so that it does not generate error in function with keys

I am creating a function that takes a nested array and returns it in a one-dimensional array, the problem is that I can not make it walk for cases in which keys {} are an element of the array, since the function .replace detect the laves, return...
asked by 21.08.2016 / 01:19
4
answers

How to compare elements of two JavaScript arrays?

I have a checkbox that allows me to filter items according to which are selected, but the system that I am was designed for a select of only 1 value, now I am adapting it to work with arrays instead of a number. Code let items = this.backup...
asked by 29.03.2017 / 22:34
3
answers

Can a new operator be created in JavaScript? [duplicate]

I need to use this logical operator: ⇒ which will be inserted in a string like this: var mystring = "(true ⇒ false) ⇒ true"; That way I should be able to evaluate that expression with eval(mystring) and return the truth value to me...
asked by 03.06.2016 / 02:56
1
answer

Map in JavaScript, go through, get keys and values

I have created a Map that has clave as a string and as value a arrays of strings . var miMapa = new Map(); miMapa.set("clave1", new Array("valor_a_1", "valor_a_2", "valor_a_3")); miMapa.set("clave2", new Array("valor_b_1", "valor_b_2"...
asked by 10.02.2016 / 11:53
1
answer

Group items from an array in Angularjs

I have an array with values of hours which, I present in a tag select as follows: Select 07:00:00 07:10:00 07:20:00 07:30:00 07:40:00 07:50:00 08:00:00 But I want to know how to group them in the following way: 07:00:00 - 07:10:0...
asked by 06.08.2016 / 02:34