Lesson

Crypto Zombies ,Ch7 Function Declarations, Solidity Programming Language

Lesson Summary

In this Crypto Zomie lesson we go over function declarations in solidity. The Solidity programming language allows us to declare functions with the function keyword first then the name of our function. Right after our named function we add parentheses and within those parentheses we add our parameters which is data we can provide to the function so the function can do "something" with it, usually... In this specific lesson we create a createZombie function which will create our Zombie army. We provide a place for a _name parameter which will take a string and a _dna parameter which will take a uint. We also learn it is convention but not necessary to begin parameter variables with an underscore to tell the difference between them and global variables.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required


Share: