Please enable JavaScript to use CodeHS

CodeHS Glossary


Parameter JavaScript

For example, in the short program below, the parameter input is used in the printText function as a parameter. It takes in the value that was passed as an argument to the function.

function start(){
    var text = "This is some text.";
    printText(text);
}

function printText(input){
    println(input);
}