Strict Violation using this keyword and revealing module pattern

前端 未结 3 1984
广开言路
广开言路 2020-12-02 17:57

Having trouble getting the following to pass jslint/jshint

/*jshint strict: true */
var myModule = (function() {
    \"use strict\";

    var privVar = true,         


        
3条回答
  •  春和景丽
    2020-12-02 18:53

    Unfortunately, this is the intended error for this setup since jslint/jshint don't know the function declared in global context is to be later used as an object method.

提交回复
热议问题