jueves, 10 de abril de 2014

funciones en javascript

funciones

cesar@developerWEB:~$ node
> function helllo(name){
... console.log("Hola " + name);
... }
undefined
> helllo("cesar")
Hola cesar
undefined

> function hello2(){
... console.log(arguments);
... }
undefined
> hello2("cesar",true,2,3,4)
{ '0': 'cesar', '1': true, '2': 2, '3': 3, '4': 4 }

> var x = function(a,b){ return a +b }
undefined
> x(3,4)


No hay comentarios:

Publicar un comentario