how to add javascript code example
Example 1: include script in html
<script type="text/javascript" src="/path/to/script.js"></script>
Example 2: script src tag in html
<script type="text/javascript"
src="file.js">
</script>
Example 3: js add
//HOW TO ADD:
var num1 = 4;
var num2 = 6;
var answer = 4 + 6; //You can do num1 + num2 here!
function add(num1, num2) {
return num1 + num2;
};
console.log("4 + 6 is: " + add());
console.log("I hope this helped!");
Example 4: add javascript
function add(param1, param2) {
return param1 + param2
}