I have a question. I am implementing setTimeOut() in a comments application, where every 3 seconds the div is refreshed so that new comments appear automatically without the need for refresh . It is working correctly:
setTimeout(listCo...
Well, I want to know if my comparison can be improved, I want to leave the code shorter.
const teste = function(a){
if(a != null && a != undefined && a != ""){
console.log('e diferente')
}else{
co...
I'm retrieving a list in JSON using the jQuery.getJSON function:
http=jQuery.getJSON(url);
This code returns the object perfectly, but the request takes longer than the loading time of the page where I will insert the data. This way,...
Assuming I use the following function in .js ... and inside it has some variables.
$(document).on("load", function(){
var Variavel1= "um";
var Variavel2= "dois";
var Variavel3= "tres";
var Variavel4= "quatro";
})
How do I us...
Is it possible for javascript to pass a variable whether it is global or not from an HTML page to another HTML?
index.html recibaria.html
Type, some way to save this value and move it to the other page without having to use php as a...
*
**
***
****
*****
******
*******
********
*********
**********
How do I do this with nested repeats using% of JavaScript, or in VisuAlg?
For you to have an idea of what the code would look like:
for(var linha = 0; linha < 10; lin...
In PHP, we have a limit for values of type int , which is shown by the PHP_INT_MAX constant.
echo PHP_INT_MAX; // Imprime: 9223372036854775807
And in the javascript? How do I find out the maximum accepted value for an object...
I have 4023.8599999999997 € to round to 4023.86, I tried:
Math.round(sum1)
but the result was: 4024 €
I also tried Math.round(sum1,2) but did not.
How to do this I'm using JavaScript.
I need to check if an array has a specific character (this: |). If it contains, this character must be deleted, and the next word that would be after that character (which actually is a separator of items) would be added in the next index. That...
I created a javascript function that assembles a calendar. I need this schedule to work according to the number and days of the week of the given month. Ex ( August 1st fell on a Tuesday ). I also need that when I change the month my schedule wi...