I've come across multiple examples and I'm getting confused about placing semicolon after declaring a function where it acts as a function inside function as shown in the below example
var myFunction = function() {
var value = "parentValue";
function otherFunction() {
var value = "childValue";
console.log("Value is : "+value);
}
otherFunction();
}
myFunction();
i.e placing the semicolon in the end of the otherFunction() declaration. If I keep ; or not it's working. So which is the best practice?