---
title: "Comment by Sanath Kumar U on \"Secrets you won't know: JavaScript\" | Hashnode"
description: "The code mentioned above is incorrect: var value = &quot; Hello World&quot; ; setTimeout ( ( function ( randomValue ) { return function ( ) { console .log( rand"
url: "https://hashnode.com/posts/secrets-you-wont-know-javascript/607eeec5c99e200d08f80ac7/comment/608773cbc126f30b01abe448"
---

[Discussion](https://hashnode.com/posts/secrets-you-wont-know-javascript/607eeec5c99e200d08f80ac7)

Comment [Secrets you won't know: JavaScript](https://hashnode.com/posts/secrets-you-wont-know-javascript/607eeec5c99e200d08f80ac7)

[Sanath Kumar U](https://hashnode.com/@sanathkumar)

[Apr 27, 2021](https://hashnode.com/posts/secrets-you-wont-know-javascript/607eeec5c99e200d08f80ac7/comment/608773cbc126f30b01abe448)

The code mentioned above is incorrect:

```
var value =" Hello World";
     setTimeout( (function( randomValue) {
          return function() { console.log( randomValue); }
         }) ( randomValue), 1000);
      value =" End";
```

It should have been :

```
 var value =" Hello World";
     setTimeout( (function( randomValue) {
          return function() { console.log( randomValue); }
         }) (value), 1000);
      value =" End";
```
