function c(n) {
var v;
if (n % 1 !== 0) v = parseFloat(n); // Verifico si el numero es decimal y uso parseFloat
else v = parseInt(n); // Verifico si el numero es entero y uso parseInt
return v; // Retorno el numero
}
conso...
var b = "Holaa Holaa Holaa Holaa ";
console.log(b);
How can I remove all Holaa matches except the first?
Exactly I mean the whole chain itself, taking into account this example:
String.prototype.repetir = function(v) {...
I need to create an HTML form that at the time of pressing submit, save all the data entered in different variables, I need them to be saved in those variables to be output later by a .pdf document which is already programmed.
Maybe the quest...
I'm starting with Bootstrap creating a page header, based on the page of this link link and a JavaDevOne tutorial on yt. My problem is that the result I get is not the one that is consistent with the example of bootstrap or the tutorial.
I...
I am trying to get a list through a url using the GET method, but it generates a very confusing error, since it is the first time I see it.
Uncaught SyntaxError: Unexpected token .
He tells me that I have the error in the next line...
I'm doing tests with vuejs and the library VeeValidate which is to validate fields in a form.
I have an example to validate an email field like the following:
<form>
<div class="form-group" :class="{'has-error': errors.has('e...
I want to show two decimals when calculating, since for example I enter the amount 100 and when calculating in the other fields many decimals appear. I already try to do it with .toFixed(2) and I can not make it work.
Illustrati...
var A = [ 'dog', 'cat', function () { return 2 * 2 } ] ;
document.body.innerHTML = A[2]
Return this: function () {return 2 * 2}
Obviously I want you to return 4 , not the syntax of a function
Or is it that you can not put a function in an...
What happens is the following I have a registration form and what I want is that what is recorded comes out a sweetAlert . The problem is that pressing the button leaves the alert so the form is not validated. I would like to know how I do...
I have this TextBox in which when I update the page you can see div as windows with a "MouseOver" event, what I try to do is the following:
When I refresh "N" times the page that in the first instance these div do not g...