Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {} JavaScript: var functionName = function() {} vs function functionName() {}
Declaring functions in JavaScript Declaring functions in JavaScript

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
Declaring functions in JavaScript

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
Declaring functions in JavaScript

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

insert duplicate link
Source Link

Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
Declaring functions in JavaScript

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

Possible Duplicate:
JavaScript: var functionName = function() {} vs function functionName() {}
Declaring functions in JavaScript

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

Source Link
CaptainCodeman
  • 2.3k
  • 2
  • 27
  • 36

Javascript Function Definition Syntax

I've seen 2 different syntaxes for defining functions in javascript:

function f() {
 ...
}

As well as

var f = function() {
 ...
};

What's the difference between these? Is one of them deprecated?

lang-js

AltStyle によって変換されたページ (->オリジナル) /