Questions tagged as 'javascript'

1
answer

Practicing platzigram in Javascript

I'm doing the Platzigram project of Platzi_ to practice Javascript and so on. When using the package.json to automate tasks with <script> it does not work for me when I execute the npm start command and the gulp watch...
asked by 06.05.2017 / 19:54
1
answer

Error compiling typescript with visual studio code

I'm trying to start in typescript and I have some problems. First of all some data: I have installed version 1.11.2 of the Visual Studio Code And I'm running Node 6.5.0 along with typescript in version 2.2.2 The problem I...
asked by 04.05.2017 / 13:17
2
answers

Enter formula with a for [closed]

I need to perform the following operation. Example, I have an array cantidad = [420, 940, 920, 850,970]; and% ancho = 4500 . The formula works like this: 420 + 940 / 2 = 890; 940 / 2 + 920 / 2 = 930; 920 /2 + 850 /2 = 885; 850...
asked by 03.03.2017 / 18:55
2
answers

How can I do in javascript a program that seems simple in Java? [closed]

I am very new to programming, I have achieved it relatively easily (thanks to multiple and clear examples on the internet) read the response of dtweet and save it in a variable. This is the code I have: package leerrespuestadedweet; impor...
asked by 05.03.2017 / 17:18
3
answers

Problem receiving the Body in NodeJS from JavaScript

How do I send the fetch to the backend? onSubmit (e) { var random = stringGen(6); e.preventDefault(); let details = new FormData(); details.append('demo_id', random); details.append('descripti...
asked by 14.03.2017 / 17:04
2
answers

Does not javascript run completely: javascript, form or echo problem?

I have two checkbox groups that are filled with database and I have a javascript function that deletes them when a radiobutton is changed (there is a radio button to show each group of checkbox), I think they are causing problems because I can n...
asked by 07.03.2017 / 17:38
1
answer

When to use clousures?

I have the following code: function creaSumador(x) { return function(y) { return x + y; }; } var suma5 = creaSumador(5); var suma10 = creaSumador(10); console.log(suma5(2)); // muestra 7 console.log(suma10(2)); // mu...
asked by 23.12.2016 / 20:29
1
answer

React For Loop with onClick inside

I am working with React, I have the following code: var rows = []; for(var i = 1; i <= this.state.numberOfPages; i++) { rows.push(<li key={i.toString()} onClick={() => this.getResults(i)}><a href="#">{i}</a></li&...
asked by 26.12.2016 / 19:59
2
answers

Remove garbage from an array

I have the following code: what I try to do is that when a new user wants to register in my project he must fill out the form 3 times once sent 3 times the record will be successful . For this reason I use localStorage to save the da...
asked by 30.12.2016 / 07:01
1
answer

How to send two variables ajax, json

Hello I would like to send by post with the following code, two variables I can only send one, any suggestions? Thanks <script type="text/javascript"> $(document).ready(function() { $("#au").change(function() { $.ajax({...
asked by 10.01.2017 / 17:44