Linked Questions

7 votes
3 answers
2k views

Tested some js code in Chrome Dev Console and I'm a bit confused. I know that in strict mode functions that are not methods of an object when referred to this keyword should receive undefined instead ...
user avatar
3 votes
1 answer
5k views

I have inherited from QGraphicsPolygonItem and would like to draw a QPixmap on the top of the item. The item itself and the pixmap should be drawn with rounded corners. How would you this?
Alexander Tyapkov's user avatar
3 votes
3 answers
3k views

Is there any way to run ES6 in Node REPL (Read Evaluate Print Loop)? While running ES 6 commands, I am getting error as shown in the screenshot. Appreciate if someone can help me to configure Node to ...
Prasad Honrao's user avatar
2 votes
2 answers
919 views

Could someone explain the fundamental difference between: define(['backbone'], function(Backbone) { MyModel = Backbone.Model.extend({ }); }); define(['backbone', 'models/mymodel'], function(...
user888734's user avatar
  • 3,917
2 votes
1 answer
8k views

Building a PWA on top of NodeJS. Utilizing gulp to processes package/bundle for production. Also using jQuery. Receiving the error: Uncaught ReferenceError: jQuery is not defined package.json: "...
Clay Hess's user avatar
  • 258
3 votes
1 answer
2k views

Is there any reason why I should consider not using 'use strict' in a node module published via npm? Is it 'safe' to do that if I want others to be able to use it? EDIT: I asked this question ...
Florian Wendelborn's user avatar
6 votes
1 answer
2k views

I'm trying to figure out whether the definition of 'use strict' extends to the prototype methods of the constructor. Example: var MyNamespace = MyNamespace || {}; MyNamespace.Page = function() { ...
Spencer Mark's user avatar
  • 5,321
4 votes
2 answers
1k views

I am learning jquery and started my first attempt at building a form validation script based on what I know so far (which isnt much). This is really only the Radio button portion of the validation ...
sleeper's user avatar
  • 3,516
7 votes
2 answers
1k views

This is not a duplicate of below questions which is dealing with browser specific questions. I'm expecting an answer whether import / export will work in Client side or not. ECMA 6 Not working ...
Venkat.R's user avatar
  • 7,804
3 votes
3 answers
2k views

Do we have to write use strict in all of the functions we have in our JS files or would writing it at the top of the code be enough to validate everything?
Leilena Tekle's user avatar
2 votes
3 answers
1k views

From MDN article about strict mode: First, strict mode makes it impossible to accidentally create global variables. In normal JavaScript mistyping a variable in an assignment creates a new ...
user avatar
4 votes
5 answers
1k views

i'm trying to encapsolate my code inside an immediate function that later on will be accessed via the global variable x and act like a "module". code: var x = (function () { console.log(x); // ...
Shlomi Komemi's user avatar
2 votes
1 answer
597 views

I've started using "use strict" for my scripts recently. One of the behaviors I noticed is that this.[name of variable] doesn't work for an object. For example: (function(){ "use strict"; window....
Moon's user avatar
  • 22.7k
0 votes
1 answer
2k views

When I added a linter to my code, I noticed I got a lot of errors regarding 'use strict'; so I added the line to a lot of files. However this broke some code in my main app.js file, which looks like ...
eignhpants's user avatar
  • 1,791
0 votes
3 answers
158 views

In the browser, it is expected that this, inside an IIFE, points to the window object. However, it is undefined in this case. (function () { "use strict"; console.log(this) // undefined ...
user avatar

15 30 50 per page
1 2 3
4
5
8