Jochem
Jochem
KPCKevin Powell - Community
Created by chasingtheflow on 10/16/2024 in #front-end
Beyond CSS: Product Cards Project
There should be additional instructions to get access to the beyond css channels
9 replies
KPCKevin Powell - Community
Created by Macro on 10/21/2024 in #front-end
site looks horrible on mobile
you're unlikely to get help in DMs, and very likely to get help from sharing anonymized code in open chat. Help in DMs is a much bigger commitment and most people don't make that commitment without knowing you first.
431 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/21/2024 in #front-end
Where to store data awaiting to be put into the html
Another good reason to call it i18n
18 replies
KPCKevin Powell - Community
Created by luca on 10/20/2024 in #ui-ux
Could you review my website please?
<a> is for links to different pages, <button> is for actions on the same page. And neither allow other interactive element inside of them so nesting them means your site might display unpredictable behavior. It's also bad for accessibility
17 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
so if you have a function add:
function add(a,b) {
return a + b;
}
function add(a,b) {
return a + b;
}
You may want a version to add two, or three, or four, which you can do with the spread operator
function add_rest(...params) {
let sum = 0;
for (const val of params) {
sum += val;
}
return sum;
}
function add_rest(...params) {
let sum = 0;
for (const val of params) {
sum += val;
}
return sum;
}
You can call add_rest with any number of parameters:
add_rest(1,2); //3
add_rest(1,2,3); //6
add_rest(1,2,3,4,5,6); //something valid, I'm tired.
add_rest(1,2); //3
add_rest(1,2,3); //6
add_rest(1,2,3,4,5,6); //something valid, I'm tired.
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
the rest operator goes in a list assignment or a function declaration and takes the "rest" of the items
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
the spread operator takes an array or object and then removes the outer layer
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
no, it's two different operators that just happen to be the same symbols
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
This message is all spread operator
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
oh, derp, I'm not even thinking straight, I didn't notice it was on the left side of the assignment in ChooKing's example
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
I did not realize they had different names, when used at the start or end of the list
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
so vue and svelt and all the rest use the spread operator a ton too, afaik
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
but yeah, you see it a lot when people need to trigger reactivity in a lot of frameworks, because appending to an existing array isn't detectable for whatever does the reactivity
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
it's got plenty of uses
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
and Epic is right, you can't do ['a','b'] + ['c'] in JS
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
the spread basically pulls off the first layer of what comes after
60 replies
KPCKevin Powell - Community
Created by snxxwyy on 10/19/2024 in #front-end
rest operator | ...
it's called the spread operator
60 replies
KPCKevin Powell - Community
Created by Faker on 10/18/2024 in #front-end
How to use a common header (eg a nav bar) or a footer on multiple html pages
This. It's a tool, learn its weaknesses, and then use it for its strengths.
99 replies
KPCKevin Powell - Community
Created by chasingtheflow on 10/16/2024 in #front-end
Beyond CSS: Product Cards Project
Or maybe the welcome email
9 replies
KPCKevin Powell - Community
Created by chasingtheflow on 10/16/2024 in #front-end
Beyond CSS: Product Cards Project
That's instructions in the course
9 replies