---
title: "Comment by Dimple Kumari on \"Javascript Interview Questions ( 'this' Keyword ) - Output Based, Scope, Implicit Binding, etc\" | Hashnode"
description: "Q3.) function makeUser() { return { name: &quot;John&quot;, ref: this }; } let user = makeUser(); alert( user.ref.name ) output will not be an error. It will re"
url: "https://hashnode.com/posts/javascript-interview-questions-this-keyword-output-based-scope-implicit-binding-etc/62c1bd1dc0401b3dcbcfab25/comment/6314b28cd49bb9d8c2f76b50"
---

[Discussion](https://hashnode.com/posts/javascript-interview-questions-this-keyword-output-based-scope-implicit-binding-etc/62c1bd1dc0401b3dcbcfab25)

Comment [Javascript Interview Questions ( 'this' Keyword ) - Output Based, Scope, Implicit Binding, etc](https://hashnode.com/posts/javascript-interview-questions-this-keyword-output-based-scope-implicit-binding-etc/62c1bd1dc0401b3dcbcfab25)

[Sep 4, 2022](https://hashnode.com/posts/javascript-interview-questions-this-keyword-output-based-scope-implicit-binding-etc/62c1bd1dc0401b3dcbcfab25/comment/6314b28cd49bb9d8c2f76b50)

Q3.) function makeUser() { return { name: "John", ref: this }; }

let user = makeUser();

alert( user.ref.name )

**output will not be an error. It will return an empty string. As window object has a name property and its value is an empty string**

let user={ name:'john', ref:this } console.log(user.name)->john console.log(user.ref)->window object console.log(user.ref.name)->empty string
