Skip to content

Commit 3714820

Browse files
committed
edit yml and other files
1 parent 5ab0fb3 commit 3714820

5 files changed

Lines changed: 70 additions & 8 deletions

File tree

.github/workflows/issues.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
issues:
55
types: [opened]
66

7+
permissions:
8+
issues: write
9+
710
jobs:
811
respond:
912
runs-on: ubuntu-latest

.github/workflows/pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
types: [opened]
66

7+
permissions:
8+
issues: write
9+
710
jobs:
811
respond:
912
runs-on: ubuntu-latest

details.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ <h1 id="details-heading"></h1>
100100
<div class="grid-2">
101101
<div class="primary">
102102
<h2>JavaScript</h2>
103-
<h3><code class="language-js heading">arr.push(value)</code></h3>
103+
<h3><code class="language-js heading">for of, arr.push(value)</code></h3>
104104
<pre><code class="language-js">
105105
const numbers = [1, 2, 3, 4, 5, 6, 7, 8];
106106
let evenSquares = [];
107107

108-
for (let i = 0; i < numbers.length; i++) {
109-
if (numbers[i] % 2 === 0) {
110-
evenSquares.push(numbers[i] ** 2);
108+
for (const num of numbers) {
109+
if (num % 2 === 0) {
110+
evenSquares.push(num ** 2);
111111
}
112112
}
113113
</code>
@@ -116,7 +116,7 @@ <h3><code class="language-js heading">arr.push(value)</code></h3>
116116
<div class="secondary">
117117
<h2>Python</h2>
118118
<!-- https://www.php.net/manual/en/ref.array.php -->
119-
<h3><code class="language-python heading">list.append(value)</code></h3>
119+
<h3><code class="language-python heading">for in, list.append(value)</code></h3>
120120
<pre><code class="language-python">
121121
numbers = [1, 2, 3, 4, 5, 6, 7, 8]
122122
even_squares = []

js/data/detailsPreEls.js

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,57 @@ const CSharp = {
215215
/* NEXT: create pre code blocks
216216
1. by language
217217
2. by data type
218-
3. by method
218+
3. by method? or just use keywords?
219219
- Not sure how to structure the data
220-
*/
220+
*/
221+
222+
const detailsPre = {
223+
"JavaScript": {
224+
"number": [
225+
{
226+
"keywords": [],
227+
"code": []
228+
},
229+
{
230+
"keywords": [],
231+
"code": []
232+
},
233+
],
234+
"string": [
235+
{
236+
"keywords": [],
237+
"code": []
238+
},
239+
],
240+
"array": [
241+
{
242+
"keywords": [],
243+
"code": []
244+
},
245+
],
246+
"object": [
247+
{
248+
"keywords": [],
249+
"code": []
250+
},
251+
],
252+
},
253+
"Python": {
254+
"number": [],
255+
"string": [],
256+
"array": [],
257+
"object": [],
258+
},
259+
"PHP": {
260+
"number": [],
261+
"string": [],
262+
"array": [],
263+
"object": [],
264+
},
265+
"CSharp": {
266+
"number": [],
267+
"string": [],
268+
"array": [],
269+
"object": [],
270+
}
271+
}

js/data/indexListEls.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ const objects = {
420420
'Object.keys(obj);',
421421
'Object.values(obj);',
422422
'obj3 = {...obj1, ...obj2}',
423+
'const {name, email} = userObj;'
423424
],
424425
"php": [
425426
'$arr = ["key" => $val];',
@@ -431,6 +432,7 @@ const objects = {
431432
'array_keys($arr);',
432433
'array_values($arr);',
433434
'$arr3 = $arr1 + $arr2;',
435+
'["name" => $name, "email" => $email] = $user;'
434436
],
435437
"python": [
436438
'dict1 = {"key": val}',
@@ -442,9 +444,10 @@ const objects = {
442444
'dict1.keys()',
443445
'dict1.values()',
444446
'dict3 = {**dict1, **dict2}',
447+
'name = user["name"] | email = user["email"]'
445448
],
446449
"csharp": [
447-
'--too long--',
450+
'new Dictionary<string, object> { ["key"] = val };',
448451
'dict1["key"]',
449452
'dict1["key"] = val;',
450453
'dict1.Remove("key");',
@@ -453,6 +456,7 @@ const objects = {
453456
'dict1.Keys',
454457
'dict1.Values',
455458
'--too long--',
459+
'N/A'
456460
],
457461
"dart": [
458462
'--too long--',
@@ -464,6 +468,7 @@ const objects = {
464468
'map1.keys.toList()',
465469
'map1.values.toList()',
466470
'var map3 = {...map1, ...map2};',
471+
''
467472
],
468473
}
469474

0 commit comments

Comments
 (0)