$(document).ready(function () {
//global variable
var cat = "Tiger";

function Animal(cat) {
//local variable
var Kat = cat;
console.log(Kat);
}
//inherits and prints "Tiger"
Animal(cat);
});