{"id":21216626,"url":"https://github.com/jackhowa/js-hello-world","last_synced_at":"2025-03-15T00:41:29.881Z","repository":{"id":78849974,"uuid":"99377190","full_name":"JackHowa/js-hello-world","owner":"JackHowa","description":"The classical introductory exercise. Just say \"Hello, World!\"","archived":false,"fork":false,"pushed_at":"2017-08-04T20:28:29.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T16:44:29.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/JackHowa.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":"2017-08-04T20:25:00.000Z","updated_at":"2017-08-04T20:28:30.000Z","dependencies_parsed_at":"2023-03-12T06:00:02.154Z","dependency_job_id":null,"html_url":"https://github.com/JackHowa/js-hello-world","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/JackHowa%2Fjs-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fjs-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fjs-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fjs-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackHowa","download_url":"https://codeload.github.com/JackHowa/js-hello-world/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243667965,"owners_count":20328036,"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-20T21:54:28.841Z","updated_at":"2025-03-15T00:41:29.862Z","avatar_url":"https://github.com/JackHowa.png","language":"JavaScript","readme":"# Hello World\n\nThe classical introductory exercise. Just say \"Hello, World!\".\n\n[\"Hello, World!\"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is\nthe traditional first program for beginning programming in a new language\nor environment.\n\nThe objectives are simple:\n\n- Write a function that returns the string \"Hello, World!\".\n- Run the test suite and make sure that it succeeds.\n- Submit your solution and check it at the website.\n\nIf everything goes well, you will be ready to fetch your first real exercise.\n\n## Tutorial\n\nThis exercise has two files:\n\n- hello-world.js\n- hello-world.spec.js\n\nThe first file is where you will write your code.\nThe second is where the tests are defined.\n\nThe tests will check whether your code is doing the right thing.\nYou don't need to be able to write a test suite from scratch,\nbut it helps to understand what a test looks like, and what\nit is doing.\n\nOpen up the test file, hello-world.spec.js.\nThere is one test inside:\n\n    it('says hello world', function() {\n      expect(helloWorld.hello()).toEqual('Hello, World!');\n    });\n\nRun the test now, with the following command on the command-line:\n\n    jasmine hello-world.spec.js\n\nThe test fails, which makes sense since you've not written any code yet.\n\nThe failure looks like this:\n\n    1) Hello World says hello world \n       Message:\n          Expected undefined to equal 'Hello, World!'.\n\nThere's more, but this is the most important part.\n\nTake a look at that first line:\n\n    1) Hello World says hello world \n\nNow look at the test definition again:\n\n    it('says hello world', function() {\n      // ... more code here ...\n    });\n\nThe text 'says hello world' is repeated.\nThis is how you know the test failed.\n\nThe failure message explains what is wrong:\n\n    Expected undefined to equal 'Hello, World!'.\n\nThis comes from the part of the test definition that says \"expect\":\n\n    expect(helloWorld.hello()).toEqual('Hello, World!');\n\nIt's comparing two values. It is calling\n\n    helloWorld.hello()\n\nand comparing the result to a hard-coded string.\n\n    'Hello, World!'.\n\nSo if you look at the failure message again, the hello function\nis returning undefined.\n\nTry changing the function in hello-world.js so that it says\n\n    HelloWorld.prototype.hello = function(input) {\n        return \"chocolate\";\n    };\n\nThen run the tests again from the command-line:\n\n    jasmine hello-world.spec.js\n\nNotice how it changes the failure message.\n\nThen change the implementation in hello-world.js again, this time to make the test pass.\n\nWhen you are done, submit your solution to exercism:\n\n    exercism submit hello-world.js\n\n\n## Setup\n\nGo through the setup instructions for JavaScript to\ninstall the necessary dependencies:\n\nhttp://exercism.io/languages/javascript\n\n## Making the Test Suite Pass\n\nExecute the tests with:\n\n    jasmine \u003cexercise-name\u003e.spec.js\n\nReplace `\u003cexercise-name\u003e` with the name of the current exercise. E.g., to\ntest the Hello World exercise:\n\n    jasmine hello-world.spec.js\n\nIn many test suites all but the first test have been skipped.\n\nOnce you get a test passing, you can unskip the next one by\nchanging `xit` to `it`.\n\n## Source\n\nThis is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program)\n\n## Submitting Incomplete Solutions\nIt's possible to submit an incomplete solution so you can see how others have completed the exercise.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fjs-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackhowa%2Fjs-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fjs-hello-world/lists"}