Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30986

Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ?

From Stanimir Stamenkov <s7an10@netscape.net>
Newsgroups comp.lang.javascript
Subject Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ?
Date 2016-07-28 08:31 +0300
Organization A noiseless patient Spider
Message-ID <nnc5bd$6pu$1@dont-email.me> (permalink)
References <nmmso1$uof$1@shakotay.alphanet.ch>

Show all headers | View raw


Wed, 20 Jul 2016 05:55:44 +0200, Une Bévue:

> That's the first time I've seen such writing :
>
> var resolve = function resolve() {
>    ...
> };
>
> (see 'z-awf-as-promise.js' in
> <https://gist.github.com/tunnckoCore/fd4d86b5dd62e5b1c10d>)
>
> and I wonder the difference(s) with :
>
> var resolve = function () {
>    ...
> };
>
> and another version :
>
> function resolve() {
>    ...
> };

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions#Function_constructor_vs._function_declaration_vs._function_expression

-- 
Stanimir

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-20 05:55 +0200
  Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-20 08:20 +0200
  Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-19 23:25 -0700
    Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 12:15 +0200
      Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-20 05:15 -0700
        Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 15:08 +0200
          Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-07-20 09:23 -0700
          Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-07-23 18:52 +0200
  Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-20 12:15 +0200
  Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Stanimir Stamenkov <s7an10@netscape.net> - 2016-07-28 08:31 +0300
    Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Une Bévue <unbewusst.sein@fai.invalid> - 2016-08-01 06:44 +0200

csiph-web