Questions tagged as 'javascript'

4
answers

How to extract the extension of a file in Javascript?

There are some cases where I need to capture the extension of a file (that is, a string with file address) to be able to validate the extension via Javascript. For example, location : var path = window.location.pathname; // /foo/bar.h...
asked by 28.02.2014 / 22:20
1
answer

Why does Google Chrome not allow copying a reference to the console.log function?

I have a method that takes a reference to a function and uses that reference to display a data (code below). The problem is that when I use the console.log function with Google Chrome, an exception occurs, which in this case is as follows...
asked by 09.01.2014 / 19:33
2
answers

What is the name of this 'effect' of selecting objects and how to do it in pure JS?

I would like to know what the 'effect' ('-') name is for selecting folders and files in Windows Explorer. And if possible I wanted to know how to do this with pure JavaScript.     
asked by 10.02.2014 / 02:21
1
answer

Livestreaming with javascript

I am developing a Livestreaming project and would like to know if it is possible to do this using websockets , javascript and html5 video capture where you would have a webpage which would capture the webcam video (with ht...
asked by 17.06.2015 / 16:36
1
answer

Market APIPayment - REST API subscription / collection (404)

I'm having trouble trying to retrieve the subscription via Ajax. This subscription id is what appears in the URL of my MercadoPago dashboard in Tools > Subscriptions > Subscribers > Subscription. The URL is https://www.me...
asked by 29.09.2017 / 19:03
6
answers

How to do a search by ignoring accent in JavaScript?

Suppose I have a list of words in JavaScript (if necessary, already sorted by collation rules ): var palavras = [ "acentuacao", "divagacão", "programaçao", "taxação" ]; Notice that I have not used cedilla ( ç ) nor...
asked by 04.02.2014 / 01:48
4
answers

What is the difference between pre- and post-increment in Javascript?

The most common and known form of increment is the post: for (var i = 0; i < 10; i++){ console.log(i); } However, I then see the pre-decrement: for (var i = 0; i < 10; ++i){ console.log(i); } However, the results are the...
asked by 14.05.2014 / 18:23
3
answers

Why is it necessary to setTimeout with value 0 (zero)?

I've been observing for some time that some event types only work correctly when we define a certain function that is called with setTimeout with value 0 . On the contrary, if we call this function without setTimeout , unwante...
asked by 27.10.2015 / 14:03
2
answers

What is the use and when to use version in .js and .css files?

What is the use and when to use file.js? v = 123 (example) file.css? v = 123 (example) What benefits and how the browser interprets this     
asked by 20.11.2014 / 12:04
1
answer

What is the programming paradigm used by JavaScript?

What is the programming paradigm used by JavaScript or is it like Python that uses multiple paradigms?     
asked by 05.05.2016 / 01:09