Most voted "ecmascript-5" questions
This tag is NOT synonymous with the [javascript] tag and should NOT be used when the question is about technical usage problems (difficulties) or third party libraries, it should be used only for doubts about the fifth edition specifications.
Learn more…22 questions
Sort by count of
-
8
votes4
answers711
viewsWhy are literal objects declared with const in Javascript currently?
Because of Ecmascript 6 I see examples that declare literal objects with the reserved word const. Code example: // Versão utilizada atualmente const obj = { x: 'example' }; // Versão utilizada…
-
7
votes1
answer492
viewsHow do Visual Studio recognize the 'use Strict' directive?
Apparently Visual Studio does not recognize the directive 'use strict', because I typed the code below that assigns value to a variable that has not been declared (something prohibited in Strict…
javascript visual-studio-2013 intellisense use-strict ecmascript-5asked 10 years, 10 months ago Zignd 6,741 -
5
votes1
answer284
viewsDoubt with Javascript Arrow Function
In the code below, the method showName() naturally return undefined, because it will fetch a name property in the scope where the obj is inserted. My question is, in that case I would necessarily…
-
5
votes2
answers516
viewsArray.push() always stacking the last foreach item
I am working on the development of a dynamic table and I am facing problems to create the rows of this table according to the columns I have and the information I receive from the API. Considering…
-
3
votes2
answers28
viewsAJAX and Weakmaps requests
As I put into practice what I have learned so far about ES2015 with Babel. specifically about Weakmaps, I got into a problem that I don’t know why it happens and with that, I don’t know how to…
-
3
votes1
answer23
viewsQuestion about assigning variables in Ecmascript 5
My doubt is related to the behavior of a variable, since it is assigned a dynamic value in it. For example in the code: var x_position = window.getComputedStyle(elemento).marginLeft; Doubt: every…
-
2
votes2
answers98
viewsUse the number of characters obtained in a regular expression sentence in string substitution
I am doing a Markdown parser as part of a study on regular expressions, and I would like to use the amount of characters obtained in an excerpt of the expression, as a basis for string substitution,…
javascript regex parser ecmascript-6 ecmascript-5asked 9 years, 3 months ago Daniel de Andrade Varela 267 -
2
votes0
answers203
viewsWhat is the difference between function expression and function definition in relation to Hoisting in Javascript?
What is the difference between function expression (named or unspecified) and function definition in relation to Hoisting no Javascript? Named function expression syntax: var somar = function…
-
2
votes2
answers307
viewsCalling function outside the scope in javascript
Follow the code to explain my mistake: class Cliente { showName(name) { alert(name) } getName(){ $.get(minha-url) .done(function(data) { this.showName(data.name) }) } } The getName method returns an…
-
2
votes0
answers43
viewsSend post parameter to restify
I’m trying to send parameter to nodejs with restify, but it’s always coming undefined I’m sending it sort of like this: $.ajax({ url : 'http://localhost:8080/api', type: 'post', dataType: 'json',…
-
2
votes1
answer118
viewsHow to return a Promise from the resolution of others?
I’m relatively new to this Promises, despite having used them numerous times, especially in AJAX requests. I’m building a front-end application that runs on Sharepoint and, to get a lot of…
javascript internet-explorer promises ecmascript-5 ecmascript-6asked 5 years, 1 month ago J. L. Muller 555 -
1
votes0
answers67
viewsIs it possible to capture the origin of a dragged file from the computer?
I wanted to send the image path from the "drop event": Javascript: window.onload = function() { var dropZone = document.getElementById('box_paper'); function handleFileSelect(event) {…
-
1
votes1
answer82
viewsQuill editor formatting button event problem
How could fix an event conflict issue on the editor click button Quill: If, for example, I use "control+b", the text bolds and bold, but when I click on the editor button, it seems to have a desired…
-
1
votes1
answer882
viewsWhat does this reticence mean in the array?
I saw that ES6 tends to be cleaner, but I can’t understand some things: 1. What exactly is this reticence doing, in theory? function getHiddenHTML(el) { return [...el.childNodes].reduce((txt, node)…
-
0
votes1
answer242
viewsTranspiling ES6 to ES5 using Babel
I have a package.json file set up to take all js files from a directory and join them into a new file, transpiling to ES5. However, it is only creating a new file and unifying all js files from the…
-
0
votes0
answers83
viewsHow to validate an identifier name in Javascript?
This question is possibly duplicated, but I seek a different approach. The situation is as follows: I made a small program to create a JSON file, creating names and assigning values. The JSON…
-
0
votes1
answer211
viewsHow to remove the first key that involves all values from a JSON
It is possible to remove the first key { } of a JSON and add in lines below (Enter), of each value? var obj = { "arvore": "/", "avo": "obadias", "pai": { "eu": "Leonardo" } } class Access { static…
-
0
votes4
answers636
viewsCheck object array index by property
When you click on an element, I get an id. With this I do it in an array and find out which object has the same id, and need to remove all objects with the same id. function onRemove(city) { for…
-
0
votes1
answer31
viewsHow to structure the parameters in a javascript object
I have the following code: var colHeaders = [ "Column 1", "Column 2" ]; var columns = [ {data: 'column_1', validator: validatorRentalCode, allowEmpty: false, allowInvalid: false}, {data: 'column_2',…
-
0
votes1
answer32
viewsA single Arrayobject for presentation and modification
Hello, I’m venturing into Angular 8, and I came across a stalemate, I get the following obj array of a service: this.productsService.getProducts().subscribe( (products: Product[]) => {…
-
0
votes1
answer205
viewsError when implementing Tensorflow in React Native
Save! I’m trying to implement the library Tensorflow in my React Native application, based in that and in that tutorials. But I can’t even run the project, getting the following error: Unable to…
-
-2
votes1
answer85
viewsHow to load a method as soon as the page is loaded ? Angularjs
I have a method, carregarpagina(); that needs to be loaded as soon as the page is loaded. How do I do this on Angularjs.
javascript angularjs angular angularjs-directives ecmascript-5asked 5 years, 8 months ago Dan100 295