how to declare javascript code inside an html code example Example: add javascript function add(param1, param2) { return param1 + param2 }