function idk() {
alert('This is an alert!')
}
//call the function to make the function run by saying "Name of function + ()"
idk()
const square = function(x) {
return x * x;
};
console.log(square(12));
// → 144
function nameOfFunction() {
// function body
}
//This is it!
function idk() {
alert('This is an alert!')
}
//call the function to make the function run by saying "Name of function + ()"
idk()
function name(parameter1, parameter2, parameter3) {
code to be executed
}
function funkyFunction(music, isWhiteBoy) {
if (isWhiteBoy) {
console.log('Play: ' + music);
}
}