codecassini
Question bank opening soonFront-end, explained simply.
Concepts and interview questions in HTML, CSS and JavaScript.
JS
Q-1 · What does this print?
Try one now
function getScore() {
return
42
}
console.log(getScore())
It prints undefined.
When return is alone on its line, JavaScript puts a semicolon right after
it, so the function gives back undefined.