{"action":"created","comment":{"url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/comments/63345374","id":63345374,"diff_hunk":"@@ -0,0 +1,45 @@\n+function any(list, value) {\n+  for (var i = 0; i < list.length; i++){\n+    if (list[i] === value){\n+      return true;\n+    }\n+  }\n+return false;\n+}\n+\n+function all(list, value) {\n+  for (var i = 0; i < list.length; i++){\n+    if (list[i] !== value){\n+      return false;\n+    }\n+  }\n+return true;\n+}\n+\n+\n+function callback(a, b){\n+  if (a === b) {","path":"valentin/L12/script.js","position":21,"original_position":21,"commit_id":"63ec2fff03e44dd238bbd55cc11c3853ec28e7cb","original_commit_id":"63ec2fff03e44dd238bbd55cc11c3853ec28e7cb","user":{"login":"zzeni","id":294592,"avatar_url":"https://avatars.githubusercontent.com/u/294592?v=3","gravatar_id":"","url":"https://api.github.com/users/zzeni","html_url":"https://github.com/zzeni","followers_url":"https://api.github.com/users/zzeni/followers","following_url":"https://api.github.com/users/zzeni/following{/other_user}","gists_url":"https://api.github.com/users/zzeni/gists{/gist_id}","starred_url":"https://api.github.com/users/zzeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzeni/subscriptions","organizations_url":"https://api.github.com/users/zzeni/orgs","repos_url":"https://api.github.com/users/zzeni/repos","events_url":"https://api.github.com/users/zzeni/events{/privacy}","received_events_url":"https://api.github.com/users/zzeni/received_events","type":"User","site_admin":false},"body":"достатъчно е да напишеш `return a === b`","created_at":"2016-05-16T12:27:33Z","updated_at":"2016-05-16T12:27:33Z","html_url":"https://github.com/zzeni/swift-academy-homeworks/pull/267#discussion_r63345374","pull_request_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267","_links":{"self":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/comments/63345374"},"html":{"href":"https://github.com/zzeni/swift-academy-homeworks/pull/267#discussion_r63345374"},"pull_request":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267"}}},"pull_request":{"url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267","id":69253020,"html_url":"https://github.com/zzeni/swift-academy-homeworks/pull/267","diff_url":"https://github.com/zzeni/swift-academy-homeworks/pull/267.diff","patch_url":"https://github.com/zzeni/swift-academy-homeworks/pull/267.patch","issue_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/267","number":267,"state":"open","locked":false,"title":"L12","user":{"login":"valyo888","id":18312240,"avatar_url":"https://avatars.githubusercontent.com/u/18312240?v=3","gravatar_id":"","url":"https://api.github.com/users/valyo888","html_url":"https://github.com/valyo888","followers_url":"https://api.github.com/users/valyo888/followers","following_url":"https://api.github.com/users/valyo888/following{/other_user}","gists_url":"https://api.github.com/users/valyo888/gists{/gist_id}","starred_url":"https://api.github.com/users/valyo888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valyo888/subscriptions","organizations_url":"https://api.github.com/users/valyo888/orgs","repos_url":"https://api.github.com/users/valyo888/repos","events_url":"https://api.github.com/users/valyo888/events{/privacy}","received_events_url":"https://api.github.com/users/valyo888/received_events","type":"User","site_admin":false},"body":"Снощи, като предавах домашното забравих да направя няколко уточнения :).\r\n1. Използвал съм брояч, заради колбека. Идеята ми е, с него да хвана колко пъти се изпълнява условието :). Дали \"поне веднъж\" или \"всеки път\" или \"нито веднъж, ако е празен масив\". \r\n2. Колбека ми връща малко неадекватни стойности, но пък това ми дойде на акъла. Идеята е, че ако ми върне 2, значи условието се изпълнява всеки път, ако ми върне 1 - поне веднъж, и ако ми върне 0,значи си ми подала празен масив, което също е възможно :).\r\n3. Като се тества, моля да се създаде някакъв масив в конзолата, защото не разбрах дали аз трябва да сложа или не. Качил съм само функциите :). Дано да не е проблем, тествал съм ги в конзолата, работят :).\r\n4. Не знам дали така е редно, но както съм ги направил hofAny и hofAll функциите, се извикват по следния начин, без да се задават параметри на колбека в извикването . Пример:\r\n\r\nvar b = [4,4,4,4];\r\nhofAny(callback, b);\r\nили\r\nhofAll(callback, b);\r\n\r\nАми това е обяснението ми :). Мисля, че всичко работи коректно, поне като го тествах беше така.","created_at":"2016-05-07T21:00:32Z","updated_at":"2016-05-16T12:27:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ace3043f01d5a2a8d978aaa4b2b806796e3489f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267/commits","review_comments_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267/comments","review_comment_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/267/comments","statuses_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/statuses/63ec2fff03e44dd238bbd55cc11c3853ec28e7cb","head":{"label":"valyo888:fe-03","ref":"fe-03","sha":"63ec2fff03e44dd238bbd55cc11c3853ec28e7cb","user":{"login":"valyo888","id":18312240,"avatar_url":"https://avatars.githubusercontent.com/u/18312240?v=3","gravatar_id":"","url":"https://api.github.com/users/valyo888","html_url":"https://github.com/valyo888","followers_url":"https://api.github.com/users/valyo888/followers","following_url":"https://api.github.com/users/valyo888/following{/other_user}","gists_url":"https://api.github.com/users/valyo888/gists{/gist_id}","starred_url":"https://api.github.com/users/valyo888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valyo888/subscriptions","organizations_url":"https://api.github.com/users/valyo888/orgs","repos_url":"https://api.github.com/users/valyo888/repos","events_url":"https://api.github.com/users/valyo888/events{/privacy}","received_events_url":"https://api.github.com/users/valyo888/received_events","type":"User","site_admin":false},"repo":{"id":55623619,"name":"swift-academy-homeworks","full_name":"valyo888/swift-academy-homeworks","owner":{"login":"valyo888","id":18312240,"avatar_url":"https://avatars.githubusercontent.com/u/18312240?v=3","gravatar_id":"","url":"https://api.github.com/users/valyo888","html_url":"https://github.com/valyo888","followers_url":"https://api.github.com/users/valyo888/followers","following_url":"https://api.github.com/users/valyo888/following{/other_user}","gists_url":"https://api.github.com/users/valyo888/gists{/gist_id}","starred_url":"https://api.github.com/users/valyo888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valyo888/subscriptions","organizations_url":"https://api.github.com/users/valyo888/orgs","repos_url":"https://api.github.com/users/valyo888/repos","events_url":"https://api.github.com/users/valyo888/events{/privacy}","received_events_url":"https://api.github.com/users/valyo888/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/valyo888/swift-academy-homeworks","description":"Swift Academy | Homeworks template ","fork":true,"url":"https://api.github.com/repos/valyo888/swift-academy-homeworks","forks_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/forks","keys_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/teams","hooks_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/hooks","issue_events_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/events","assignees_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/tags","blobs_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/languages","stargazers_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/stargazers","contributors_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/contributors","subscribers_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/subscribers","subscription_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/subscription","commits_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/merges","archive_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/downloads","issues_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/labels{/name}","releases_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/valyo888/swift-academy-homeworks/deployments","created_at":"2016-04-06T16:46:52Z","updated_at":"2016-04-06T16:54:08Z","pushed_at":"2016-05-15T06:50:36Z","git_url":"git://github.com/valyo888/swift-academy-homeworks.git","ssh_url":"git@github.com:valyo888/swift-academy-homeworks.git","clone_url":"https://github.com/valyo888/swift-academy-homeworks.git","svn_url":"https://github.com/valyo888/swift-academy-homeworks","homepage":"","size":287103,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"fe-03"}},"base":{"label":"zzeni:fe-03","ref":"fe-03","sha":"c73d7b76146c86be4030192bd6a7ea29c597cbf0","user":{"login":"zzeni","id":294592,"avatar_url":"https://avatars.githubusercontent.com/u/294592?v=3","gravatar_id":"","url":"https://api.github.com/users/zzeni","html_url":"https://github.com/zzeni","followers_url":"https://api.github.com/users/zzeni/followers","following_url":"https://api.github.com/users/zzeni/following{/other_user}","gists_url":"https://api.github.com/users/zzeni/gists{/gist_id}","starred_url":"https://api.github.com/users/zzeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzeni/subscriptions","organizations_url":"https://api.github.com/users/zzeni/orgs","repos_url":"https://api.github.com/users/zzeni/repos","events_url":"https://api.github.com/users/zzeni/events{/privacy}","received_events_url":"https://api.github.com/users/zzeni/received_events","type":"User","site_admin":false},"repo":{"id":44493431,"name":"swift-academy-homeworks","full_name":"zzeni/swift-academy-homeworks","owner":{"login":"zzeni","id":294592,"avatar_url":"https://avatars.githubusercontent.com/u/294592?v=3","gravatar_id":"","url":"https://api.github.com/users/zzeni","html_url":"https://github.com/zzeni","followers_url":"https://api.github.com/users/zzeni/followers","following_url":"https://api.github.com/users/zzeni/following{/other_user}","gists_url":"https://api.github.com/users/zzeni/gists{/gist_id}","starred_url":"https://api.github.com/users/zzeni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzeni/subscriptions","organizations_url":"https://api.github.com/users/zzeni/orgs","repos_url":"https://api.github.com/users/zzeni/repos","events_url":"https://api.github.com/users/zzeni/events{/privacy}","received_events_url":"https://api.github.com/users/zzeni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zzeni/swift-academy-homeworks","description":"Swift Academy | Homeworks template ","fork":false,"url":"https://api.github.com/repos/zzeni/swift-academy-homeworks","forks_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/forks","keys_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/teams","hooks_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/hooks","issue_events_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/events","assignees_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/tags","blobs_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/languages","stargazers_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/stargazers","contributors_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/contributors","subscribers_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/subscribers","subscription_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/subscription","commits_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/merges","archive_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/downloads","issues_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/labels{/name}","releases_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/zzeni/swift-academy-homeworks/deployments","created_at":"2015-10-18T19:43:41Z","updated_at":"2016-04-20T07:41:55Z","pushed_at":"2016-05-16T12:25:43Z","git_url":"git://github.com/zzeni/swift-academy-homeworks.git","ssh_url":"git@github.com:zzeni/swift-academy-homeworks.git","clone_url":"https://github.com/zzeni/swift-academy-homeworks.git","svn_url":"https://github.com/zzeni/swift-academy-homeworks","homepage":"","size":304271,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":1,"forks":43,"open_issues":1,"watchers":2,"default_branch":"fe-03"}},"_links":{"self":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267"},"html":{"href":"https://github.com/zzeni/swift-academy-homeworks/pull/267"},"issue":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/267"},"comments":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/issues/267/comments"},"review_comments":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267/comments"},"review_comment":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/pulls/267/commits"},"statuses":{"href":"https://api.github.com/repos/zzeni/swift-academy-homeworks/statuses/63ec2fff03e44dd238bbd55cc11c3853ec28e7cb"}}}}