Title: Question re Battleship game in Ch. 8: why functions are not part of our objects? · Issue #16 · bethrobson/Head-First-JavaScript-Programming · GitHub
Open Graph Title: Question re Battleship game in Ch. 8: why functions are not part of our objects? · Issue #16 · bethrobson/Head-First-JavaScript-Programming
X Title: Question re Battleship game in Ch. 8: why functions are not part of our objects? · Issue #16 · bethrobson/Head-First-JavaScript-Programming
Description: I have a question about this Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function parseGuess() and handler functions, like handleKeyPress are not a part of the objects. ...
Open Graph Description: I have a question about this Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function parseGuess() and handler functions, like handle...
X Description: I have a question about this Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function parseGuess() and handler functions, like handle...
Opengraph URL: https://github.com/bethrobson/Head-First-JavaScript-Programming/issues/16
X: @github
Domain: www.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Question re Battleship game in Ch. 8: why functions are not part of our objects? ","articleBody":"I have a question about [this](https://github.com/bethrobson/Head-First-JavaScript-Programming/blob/master/chapter8/battleship.js) Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function `parseGuess()` and handler functions, like `handleKeyPress` are not a part of the objects. \n\nFor example, why couldn't we make the `parseGuess()` function a method of controller object? And is `init` function always a stand-alone function because it needs to start everything? \n\nThank you so much! \n","author":{"url":"https://github.com/mashablair","@type":"Person","name":"mashablair"},"datePublished":"2016-09-23T00:04:04.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/16/Head-First-JavaScript-Programming/issues/16"}
| 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:0fe28410-cb67-2a0d-86a6-5a78f729d300 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8068:C9AAD:B7FCD:F0930:6A6157D4 |
| html-safe-nonce | 9596333d6c9ff4c043fbaee39979adf11957e6f0e2994ec9960c47e077a01115 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDY4OkM5QUFEOkI3RkNEOkYwOTMwOjZBNjE1N0Q0IiwidmlzaXRvcl9pZCI6IjY0MjEwNDY5NjMzODAyNDY0ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7380bfdbcaa2b60de910d1e300bbafe10a210179456c6b014a592081a40f25c5 |
| hovercard-subject-tag | issue:178751201 |
| 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/bethrobson/Head-First-JavaScript-Programming/16/issue_layout |
| twitter:image | https://opengraph.githubassets.com/29d793ffe0064a710c0cd5104b9fac192ee4706d3795dfd061610b69a1d4d42e/bethrobson/Head-First-JavaScript-Programming/issues/16 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/29d793ffe0064a710c0cd5104b9fac192ee4706d3795dfd061610b69a1d4d42e/bethrobson/Head-First-JavaScript-Programming/issues/16 |
| og:image:alt | I have a question about this Battleship code in Chapter 8. We have the model, view, controller objects; however, some functions, like helper function parseGuess() and handler functions, like handle... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mashablair |
| hostname | github.com |
| expected-hostname | github.com |
| None | c258d2b06b498220e3b94af28b26bbbf58f4203a6373725f779afcc867afd263 |
| turbo-cache-control | no-preview |
| go-import | github.com/bethrobson/Head-First-JavaScript-Programming git https://github.com/bethrobson/Head-First-JavaScript-Programming.git |
| octolytics-dimension-user_id | 30760 |
| octolytics-dimension-user_login | bethrobson |
| octolytics-dimension-repository_id | 8868903 |
| octolytics-dimension-repository_nwo | bethrobson/Head-First-JavaScript-Programming |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8868903 |
| octolytics-dimension-repository_network_root_nwo | bethrobson/Head-First-JavaScript-Programming |
| 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 | bae60047c72c7890f36d34d78461f3453c546ee2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width