{"action":"created","issue":{"url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/229","repository_url":"https://api.github.com/repos/JirkaDellOro/EIA2","labels_url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/229/comments","events_url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/229/events","html_url":"https://github.com/JirkaDellOro/EIA2/issues/229","id":374645439,"node_id":"MDU6SXNzdWUzNzQ2NDU0Mzk=","number":229,"title":"Variable wird nicht von Funktion übernommen","user":{"login":"t0mmy93","id":43846955,"node_id":"MDQ6VXNlcjQzODQ2OTU1","avatar_url":"https://avatars1.githubusercontent.com/u/43846955?v=4","gravatar_id":"","url":"https://api.github.com/users/t0mmy93","html_url":"https://github.com/t0mmy93","followers_url":"https://api.github.com/users/t0mmy93/followers","following_url":"https://api.github.com/users/t0mmy93/following{/other_user}","gists_url":"https://api.github.com/users/t0mmy93/gists{/gist_id}","starred_url":"https://api.github.com/users/t0mmy93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t0mmy93/subscriptions","organizations_url":"https://api.github.com/users/t0mmy93/orgs","repos_url":"https://api.github.com/users/t0mmy93/repos","events_url":"https://api.github.com/users/t0mmy93/events{/privacy}","received_events_url":"https://api.github.com/users/t0mmy93/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-27T13:30:55Z","updated_at":"2018-10-27T19:13:09Z","closed_at":null,"author_association":"NONE","body":"Hallo, \r\nich habe folgendes Problem:\r\nDie placeSpan function in der main function nutz den Farbwert nicht, laut console.log besitzt sie jedoch einen Farbwert. Gebe ich r, y, etc. anstatt von \"color2\" in die placeSpan funtion ein bekommen die span Elemente eine Farbe.\r\n\r\n function placeSpan(color3: string, name3: string): void {\r\n        let r = \"#ff0000\";\r\n        let y = \"#ffff00\";\r\n        let g = \"#00ff00\";\r\n        let b = \"#0000ff\";\r\n        let n = \"#000000\";\r\n        let span: HTMLSpanElement = document.createElement(\"span\");\r\n        document.body.appendChild(span);\r\n        span.setAttribute(\"id\", \"a\" + name3);\r\n        document.getElementById(\"a\" + name3).innerHTML += name3;\r\n        let s: CSSStyleDeclaration = span.style;\r\n        s.backgroundColor = color3;\r\n        console.log(name3);\r\n\r\n    }\r\n\r\n\r\n    function main(): void {\r\n\r\n        let j: number;\r\n        let i: string = prompt(\"Wie viele Karten pro Spieler?\");\r\n        j = Number(i);\r\n\r\n        for (let d: number = 0; j > d; d++) {\r\n            let l: number = random(deck.length);\r\n            let str: string = deck[l];\r\n            let color2: string = str.substring(0, 1);\r\n            console.log(str.substring(0, 1));\r\n            let name2: string = str.substring(1, 6);\r\n            console.log(str.substring(1, 6));\r\n\r\n            placeSpan(color2, name2);\r\n\r\n            let remove = deck.splice(l - 1, 1);\r\n            let lenght: number = deck.length;\r\n            console.log(lenght);\r\n            continue;\r\n\r\n        }"},"comment":{"url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/comments/433647469","html_url":"https://github.com/JirkaDellOro/EIA2/issues/229#issuecomment-433647469","issue_url":"https://api.github.com/repos/JirkaDellOro/EIA2/issues/229","id":433647469,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzY0NzQ2OQ==","user":{"login":"JirkaDellOro","id":6279994,"node_id":"MDQ6VXNlcjYyNzk5OTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6279994?v=4","gravatar_id":"","url":"https://api.github.com/users/JirkaDellOro","html_url":"https://github.com/JirkaDellOro","followers_url":"https://api.github.com/users/JirkaDellOro/followers","following_url":"https://api.github.com/users/JirkaDellOro/following{/other_user}","gists_url":"https://api.github.com/users/JirkaDellOro/gists{/gist_id}","starred_url":"https://api.github.com/users/JirkaDellOro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JirkaDellOro/subscriptions","organizations_url":"https://api.github.com/users/JirkaDellOro/orgs","repos_url":"https://api.github.com/users/JirkaDellOro/repos","events_url":"https://api.github.com/users/JirkaDellOro/events{/privacy}","received_events_url":"https://api.github.com/users/JirkaDellOro/received_events","type":"User","site_admin":false},"created_at":"2018-10-27T19:13:09Z","updated_at":"2018-10-27T19:13:09Z","author_association":"OWNER","body":"Aber schon mal als Tipp: mit \"r\", \"g\", \"y\" etc als Farbe kann der Browser nichts anfangen. \"#ff0000\" dagegen kennt er. Man muss aber ja die Farbwerte nicht im Code angeben, CSS ist dafür gemacht."}}
{"actor":{"display_login":"JirkaDellOro"}}