Questions tagged as 'javascript'

3
answers

Differences between OnKeyUp, OnKeyDown and OnKeyPress?

When exactly are they fired? And what are the contexts of use for each? I ask this because of all the times I had to use always I solved only with onkeyup . Although the doubt is in javascript it reflects in other languages as we...
asked by 12.06.2015 / 15:56
2
answers

Could current JavaScript engines optimize recursive "tail" calls?

In functional programming , it is very common to use functions recursive . Certain languages, such as Scheme, do not even have control structures for loops, depending on recursion to iterate over lists. JavaScript has functional features, s...
asked by 27.01.2014 / 17:29
6
answers

Sum of 2 inputs and appear in real time - Javascript

My question is this: I have two type text inputs. One person would put a number in input 1 and another number in input 2. When the person just finished filling in, the result of the sum of the two inputs would appear automatically in real tim...
asked by 18.09.2015 / 19:15
7
answers

How do I know if a variable is of type Number in JavaScript?

In javascript, because there is no declaration of variable types such as Integer , String , Boolean , etc., it is a difficult task to know what kind of value you are dealing with in a particular variable. / p> So, to make my...
asked by 04.02.2014 / 16:47
5
answers

How to validate with regex a string containing only letters, blanks and letters with an accent?

I want to validate an input text for full name in order to accept only letters, blanks and accented letters.    Valid Formats:   Leandro Moreira   leandro moreira   Kézia Maria   kezia maria   Cabaço da silva   Cabaço da Silva This...
asked by 14.05.2014 / 00:05
4
answers

Hide JS code

I've been trying to figure out if there is any way to hide the direct access JavaScript source code. Is there any way to do this?     
asked by 11.07.2014 / 09:11
4
answers

Clear cache of browsers with javascript

Is it possible to clear the cache of Firefox and Chrome browsers via Javascript? With Internet Explorer I can do it, but not the ones mentioned above. Dude, it did not work, I think the problem occurs because unless the user logged in remembe...
asked by 10.06.2014 / 14:27
2
answers

Is there any way to enable browser fullscreen with Javascript?

I notice that the main browsers are in full screen mode when pressing the F11 key, is this a functionality of the browser itself or is it possible to activate this through some Javascript code? If you can not do it via code, just open a new w...
asked by 10.01.2014 / 19:38
1
answer

Is it always possible that (a == 1 && a == 2 && a == 3) can be evaluated as true in JavaScript?

Can (a == 1 && a == 2 && a == 3) be evaluated as true ? This is an interview question from a large technology company. I'm trying to find the answer. I know we never wrote this code in our day-to-day life, but I'm...
asked by 24.01.2018 / 02:00
1
answer

Desktop notifications in Chrome with Javascript

I have an application where I need to send notifications to the user, and I would like these to appear on the desktop, as shown in the example below. Is it possible to do it with Javascript ? If yes, how? I did not want to use alert()...
asked by 17.01.2014 / 01:43