function updateTitle(title) {
title = "updated title";
}
var currentTitle = "original title";
currentTitle = updateTitle(currentTitle);
console.log(currentTitle)
I'm just starting to learn JavaScript and I'm curious about why this code behaves in this way?