Difference between revisions of "Array initialization"

From Conservapedia
Jump to navigation Jump to search
(I'm getting tired of googling this each time I switch languages)
(No difference)

Revision as of 18:01, September 16, 2010

Array initialization is done differently, depending on the computer programming language being used. Java borrows the curly brace syntax of C++ as follows:

int[] temp = {-40, 0, 20, 100};

Javascript is similar, but uses square brackets:

var temp = [-40, 32, 68, 212];