Function prototype: Difference between revisions

Content added Content deleted
(Improved examples (look less like a Java knock-off))
Line 312:
 
=={{header|JavaScript}}==
JavaScript functions may also be used to define prototype objects
JavaScript does use function prototypes, it doesn't care the type of function, only that it is indeed a function.
<lang JavaScript>
// A prototype declaration for a function that does not require arguments
 
ents
function List() {}