variable.constructor Javascript.
Go to solution
Solved by 0x21,
Dog() is a call to the function without passing a parameter for the name.
Dog is the name of the function.
What you are doing in this case is:
console.log(new_variable.constructor, Dog(), new_variable.constructor === Dog()); // [Function: Dog] undefined false
You can read more about constructors here.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now