Title: Documentation improvement: clarify function assignment behavior · Issue #3973 · javascript-tutorial/en.javascript.info · GitHub
Open Graph Title: Documentation improvement: clarify function assignment behavior · Issue #3973 · javascript-tutorial/en.javascript.info
X Title: Documentation improvement: clarify function assignment behavior · Issue #3973 · javascript-tutorial/en.javascript.info
Description: I was reading the Function expressions section and noticed a wording choice that confused me a little. The section mentions that we can "copy a function to another variable". Maybe the intention is to show that functions are values in Ja...
Open Graph Description: I was reading the Function expressions section and noticed a wording choice that confused me a little. The section mentions that we can "copy a function to another variable". Maybe the intention is...
X Description: I was reading the Function expressions section and noticed a wording choice that confused me a little. The section mentions that we can "copy a function to another variable". Maybe the in...
Opengraph URL: https://github.com/javascript-tutorial/en.javascript.info/issues/3973
X: @github
Domain: www.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Documentation improvement: clarify function assignment behavior","articleBody":"I was reading the Function expressions section and noticed a wording choice that confused me a little.\n\nThe section mentions that we can \"copy a function to another variable\". Maybe the intention is to show that functions are values in JavaScript, the wording initially made me think that a new function was being created.\n\n**issue in the section -\u003e url -\u003e https://javascript.info/function-expressions\ntopic is \"Function is a Value\"**\n\nthe example code was -\u003e\nfunction sayHi() { // (1) create\n alert( \"Hello\" );\n}\n\nlet func = sayHi; // (2) copy\n\nfunc(); // Hello // (3) run the copy (it works)!\nsayHi(); // Hello // this still works too (why wouldn't it)\n\n\n\nMy understanding is that func receives a reference to the same function object rather than creating an independent copy of the function itself.\nThere maybe a chance that i have misunderstood it , the copy could mean the reference is copied and a little context about reference would help even if it is included in the previous section.\n\nThis is not a major issue, but I thought a small clarification might help readers who are learning about values and references.\n\nThank you so much for the documentation\n","author":{"url":"https://github.com/sujayhegde23","@type":"Person","name":"sujayhegde23"},"datePublished":"2026-06-20T17:31:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3973/en.javascript.info/issues/3973"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9400fe09-9a5c-bf09-bc87-636faab28b41 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4FE:E9EB2:36D3C9:48CAF0:6A57FCB7 |
| html-safe-nonce | 2b872c899ecc5f4864eb90129d407124b1af439325b85c38d872a9dbec1abfa9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEZFOkU5RUIyOjM2RDNDOTo0OENBRjA6NkE1N0ZDQjciLCJ2aXNpdG9yX2lkIjoiNzYxOTQ1Mjc0NzE3NjczNzk3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b20b63a1526e5d87724da8938396b22803d4834418a6904bac9e26f30b64409 |
| hovercard-subject-tag | issue:4707740464 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-tutorial/en.javascript.info/3973/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f3d5af5d303894ae44df88df053f92a025faec3f10441703dee4b02239885ab7/javascript-tutorial/en.javascript.info/issues/3973 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f3d5af5d303894ae44df88df053f92a025faec3f10441703dee4b02239885ab7/javascript-tutorial/en.javascript.info/issues/3973 |
| og:image:alt | I was reading the Function expressions section and noticed a wording choice that confused me a little. The section mentions that we can "copy a function to another variable". Maybe the intention is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sujayhegde23 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121 |
| turbo-cache-control | no-preview |
| go-import | github.com/javascript-tutorial/en.javascript.info git https://github.com/javascript-tutorial/en.javascript.info.git |
| octolytics-dimension-user_id | 49552305 |
| octolytics-dimension-user_login | javascript-tutorial |
| octolytics-dimension-repository_id | 93253246 |
| octolytics-dimension-repository_nwo | javascript-tutorial/en.javascript.info |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 93253246 |
| octolytics-dimension-repository_network_root_nwo | javascript-tutorial/en.javascript.info |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width