Skip to content

Commit 945e73b

Browse files
authored
a bit of refactoring
1 parent bf067a2 commit 945e73b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frameworks/keyed/karyon/app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ const actions = [
3737
['Create 10,000 rows', 'runlots', () => rows(create(10000))],
3838
['Append 1,000 rows', 'add', () => rows([...rows(), ...create(1000)])],
3939
['Update every 10th row', 'update', () => State.batch(() => {
40-
for (let i = 0, all = rows(), row; i < all.length; i += 10)
41-
(row = all[i])?.text(`${row.text()} !!!`);
40+
for (let r = rows(), i = 0; i < r.length; i += 10)
41+
r[i]?.text(`${r[i].text()} !!!`);
4242
})],
4343
['Clear', 'clear', () => rows([])],
4444
['Swap Rows', 'swaprows', () => {
45-
const all = rows();
46-
[all[1], all[998]] = [all[998], all[1]], rows([...all]);
45+
const r = rows();
46+
[r[1], r[998]] = [r[998], r[1]], rows([...r]);
4747
}]].map(([content, id, click]) =>
4848
({class: 'col-sm-6 smallpad', content:
4949
{is: 'button', id, class: 'btn btn-primary btn-block',

0 commit comments

Comments
 (0)