Answers for "add js"

10

how to add script in html head

<script src="script.js" defer></script>

<!--just add defer attribute so script will execute at last-->
Posted by: Guest on August-21-2020
1

add to set js

const mySet = new Set();

mySet.add(15);
mySet.add(33);
mySet.add(15);

for(let item of mySet) {
	console.log(item)
    // expected output: 15
	// expected output: 33
}
Posted by: Guest on October-10-2020
2

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!");
Posted by: Guest on June-21-2020
0

add javascript

function add(param1, param2) {
    return param1 + param2
}
Posted by: Guest on November-10-2020

Browse Popular Code Answers by Language