{"id":19030499,"url":"https://github.com/sofish/learn-js","last_synced_at":"2025-10-29T11:46:30.243Z","repository":{"id":143449391,"uuid":"54096257","full_name":"sofish/learn-js","owner":"sofish","description":"老婆想学 js 这件事就是一个政治任务","archived":false,"fork":false,"pushed_at":"2016-04-15T04:32:10.000Z","size":2,"stargazers_count":143,"open_issues_count":16,"forks_count":9,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-01-02T03:44:59.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sofish.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-17T07:05:39.000Z","updated_at":"2024-11-05T12:06:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"edb7557e-ca5a-4dbc-a7d1-73688a6bdce3","html_url":"https://github.com/sofish/learn-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Flearn-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Flearn-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Flearn-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofish%2Flearn-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sofish","download_url":"https://codeload.github.com/sofish/learn-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240079638,"owners_count":19744725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T21:18:13.905Z","updated_at":"2025-10-29T11:46:30.131Z","avatar_url":"https://github.com/sofish.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"__使用指南：__\n\n- 有问题，任何问题，直接 [新建 issue](https://github.com/sofish/learn-js/issues) \n- 每天更新的文章都放在这个 [Milestone 里](https://github.com/sofish/learn-js/milestones/Daily%20Post) ，共计会更新 60 篇\n- 想要收藏的点 star，想了每个更新细节的点 watch，不要 fork（除非你想提 pull-request）\n\n\n# 从 0 开始 JavaScript\n\n从玩儿角度来说，老婆想学 JavaScript 这件事其实是政治义务，算是一个幸福的抱怨。抱歉各位编辑，\n写书对我来说太正式，不如像写散文一样写几篇文章发在 GitHub，顺路尝试一下当老师的感觉，\n也可能顺路教会一个人一门编程语言，这种方式比较适合我。从正儿八经的角度来说，对于 JavaScript 这门日新月异\n的语言来说，我也需要找时间好好总结和学习一下，因为她和几年前对比已经不再那么简单，\n甚至那些简单的一运行就知道解决的代码，也已经可以考倒我。\n\n举个例子，某天老婆问我一道题让我给解释一下答案的原理：\n\n```js\nvar a = 1;\nvar b = {\n  a: 2,\n  c: function() {\n    console.log(this.a);\n  }\n}\n\n// 求值\nb.c();\n(b.c)();\n(0, b.c)();\n```\n\n为什么不同方式 `b.c` 的返回结果不一样，每一种的原理是什么？像这样的问题，有关作用域、返回值、操作符，都是\n一些 ECMAScript 标准里描述的内容。当然，也会在这个教程里，一一解答，这个以及这类问题。\n\n像以上说的是 JavaScript 本身，那么学会了语言的基本用法，实际上我们会遇到的一些问题，比如「速度优化」这样\n的实践问题，本身可以写成「一千零一个 JavaScript 故事」，看时间，看老婆想不想学吧。\n\n这是一个可能烂尾的项目，所以不用抱什么期望。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofish%2Flearn-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsofish%2Flearn-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofish%2Flearn-js/lists"}