I'm doing a JS course and created an .js file in var/www/html/js/index.js
. But when I try to run the file in the browser http://localhost/js/index.js
it does not execute! Just show me the code I wrote in the browser.
This is my file:
function Person() {
this.name = '';
this.age = '';
this.eyesColor = '';
this.body = '';
this.move = function() {
//
}
this.say = function() {
//
}
this.see = function() {
//
}
}
var lucas = new Person();
console.log(typeof Person());
console.log(typeof lucas);