Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stanimir Stamenkov Newsgroups: comp.lang.javascript Subject: Re: difference between "var resolve = function resolve() {...}" and "var resolve = function () {...}" ? Date: Thu, 28 Jul 2016 08:31:22 +0300 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 28 Jul 2016 05:31:25 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="65b17bf868be970bab306ea7b3db764a"; logging-data="6974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yAnl/sMTsY0qEUalnzu8U" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 In-Reply-To: X-Face: "@)%Vlap6d%OVYDS}B4YUWE@yUy+^!w/+.q.,c5kjI#+uG?kYP&r/pTjNWgo:g[A,O=AL3/ j&4Le2cau$ > var resolve = function resolve() { > ... > }; > > (see 'z-awf-as-promise.js' in > ) > > 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