Questions tagged as 'funciones'

2
answers

How and when are isset () and empty () used correctly?

I have seen on many occasions when receiving the data of a form the following check: if (isset($_POST['campo1'])) { // Resto de código } What happens if the $_POST['campo1'] value is empty? Or on many other occasions I have se...
asked by 06.11.2016 / 13:51
2
answers

What does function ({Something, something More, still More}) {} mean? in Javascript

Watching a tutorial I found an expression like this: function ( { algo, algoMas, todaviaMas } ) { } Doing a bit of research, I found Destructuring in ES6 : The unstructured data, or    destructuring named parameter: "destru...
asked by 22.08.2018 / 23:56
2
answers

What problems can cause using obsolete javascript functions?

I have the following question, is it a problem to use obsolete javascript functions? As for example using the functions "escape" and "unescape" instead of "encodeURI" and "decodeURI". Greetings.     
asked by 07.03.2018 / 09:37
2
answers

Doubt about the "return" statement in recursion - C

I am studying the subject of recursion and I have two doubts that consist of the following: 1 .- I have seen that normally when calling a function within itself it is done through return , something like the following: return fibonacci(n...
asked by 07.04.2017 / 03:05
4
answers

Function to add a variable when clicking on JavaScript

I'm trying to make a function that every time I click a button, add a value to a variable, and it shows on the screen but it does not work. Any ideas on how to fix it? <button onclick="myFunction()">Click me</button> <p id="d...
asked by 08.10.2016 / 16:26
1
answer

Change variable by call to function

I need to know if this can be done, I think with pointers it could be but I do not know what form. On the one hand we have a function cambiarValor void cambiarValor (int a){ a=a*4; } and on the other hand the main from whe...
asked by 09.05.2018 / 12:31
2
answers

C ++, Matrices, random numbers?

I am struggling to make a subprocess that fills an array of n x n, with even random numbers, which must be between 1 and 100. As I understand it, to generate the random numbers I can use the function rand , but I do not really know what...
asked by 29.10.2016 / 06:49
1
answer

Register a series of clicks in JavaScript

I am working on an HTML5 game of memory called SIMON in which there is a board with 4 colored pads (green, red, yellow and blue), an ignition switch and 2 buttons to play in different modes. The user must click on the number of pads that are...
asked by 22.10.2016 / 05:45
3
answers

Determinant of a 3x3 matrix

Hello good night I have a question about how to do the operation to obtain the result of a 3x3 determinant, I have been looking for ideas on how to put it in my code but I can not understand it: /, until now I only have the matrix printed, I jus...
asked by 03.08.2018 / 03:20
3
answers

help for this algorithm to change currencies?

Based on the algorithm in this hacker rank video, link , I have tried to create my own algorithm that returns the value that I am looking. Basically, to save you 10 minutes, the algorithm of that video is recursive and stores the information...
asked by 29.04.2018 / 05:22