Questions tagged as 'ecmascript-6'

1
answer

$ (this) na arrow function returns different element

Notice that the $(this) in each case below points to a different element: 1st) Function: $("button").click(function(){ $("input").val(function(){ return $(this).val(); }); }); ↑ ↑ ¯¯¯...
asked by 27.03.2018 / 00:47
2
answers

How to make NetBeans recognize the syntax of the ES2015?

Using NetBeans with ES2015 ? I've done some testing with version 8.0.1 and 8.0.2 of NetBeans, but it does not recognize the new syntax: let , const , etc.     
asked by 29.07.2016 / 23:54
1
answer

Is there still reason to use var in JavaScript? [duplicate]

ES6 introduced the keywords let and const for declaration of variables. Is there still reason to use var ? If yes, what scenarios to use?     
asked by 08.09.2017 / 02:08
0
answers

Some of my code does not seem to go through Babel before arriving in Uglify

I am not able to generate the production build of my application with Laravel Mix. When trying to build the build, npm tells me that there was an error while trying to run UglifyJs:    /js/app.js from UglifyJs   Unexpected token: operator (&...
asked by 13.05.2017 / 18:07
3
answers

Error calling a secondary method via CALLBACK: Uncaught TypeError: Can not read property 'child_name' of undefined

With JavaScript (ECMAScript-6), when calling a method via callback , if this method uses another method the following error occurs:    Uncaught TypeError: Can not read property 'child_name' of undefined If the method is called directly i...
asked by 12.10.2016 / 02:33
2
answers

Use the number of characters obtained in a regular expression sentence in the string substitution

I'm doing a Markdown parser as part of a regular expression study, and I'd like to use the amount of characters in a stretch of the expression as a basis for string substitution, for example: # Titulo ## Titulo The first title will be added...
asked by 20.08.2015 / 19:38
1
answer

How to solve: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'

I have a problem with an application using ES6. I am creating a table that receives values from a form, but every time I click the button to send the information to the table, it gives the following error.    Failed to execute 'appendChild' o...
asked by 29.12.2017 / 19:29
1
answer

How to break lines according to a value

How do I break lines by value? For example a = 8. Then I have a "d" variable that receives a string. var d="written work considered in its original wording". If I put an If = a; it traverses the string by always counting q for 8 characters it br...
asked by 30.09.2018 / 23:58
1
answer

Make React components available as dependency

blz? I have some react components here and I need to make them all available in a dependency, style or semantic, how can I do this? I'm trying to export the components into an index that imports and exports everything but I'm having a problem...
asked by 11.07.2017 / 21:49
2
answers

How to set conditional properties for a literal object in the simplest way possible with Javascript?

I'd like to know how to add conditional properties to a literal object in the simplest possible way. I currently declare the object and then add the conditional properties as in the following example: function getFamilia(avos) { const fam...
asked by 28.03.2017 / 15:16