Zenon
KPCKevin Powell - Community
•Created by Zenon on 7/5/2023 in #front-end
Identify .js file that changes an HTML element
Exactly what I was looking for, thanks a lot.
7 replies
KPCKevin Powell - Community
•Created by Zenon on 6/25/2023 in #os-and-tools
VSC coloring
Okay, and because view1 is an HTML collection and view2 is Node collection, so in first case it knows it is referring to an HTML/CSS property and in the second case it is just a word.
3 replies
KPCKevin Powell - Community
•Created by Zenon on 6/25/2023 in #os-and-tools
VSC coloring
I think I know. Because some of those I either typed myself or accepted different suggestions. When I mouse over the blue ones, I get to see the MDN reference. When I mouse over the gray ones, I see just "any".
3 replies
KPCKevin Powell - Community
•Created by Zenon on 6/24/2023 in #front-end
JS: classes, factory functions, private fields
Thanks a lot vanilla, this was very understandable.
14 replies
KPCKevin Powell - Community
•Created by Zenon on 6/24/2023 in #front-end
JS: classes, factory functions, private fields
What is also interesting to note is that, after creating a second pizza by calling that function, the crust value of the first pizza doesn't reset, meaning it IS stored specifically for that first pizza object.
14 replies
KPCKevin Powell - Community
•Created by Zenon on 6/24/2023 in #front-end
JS: classes, factory functions, private fields
Thank you both, I think I understand it from an "outside" perspective.
Some follow-up questions regarding factory functions with the following example:
function pizzaFactory(pizzaSize) {
let crust = "original"
const size = pizzaSize
return {
bake: () => console.log(
Baking a ${size} ${crust} crust pizza
),
setCrust: (newCrust) => crust = newCrust
}
}
I am just testing around and it seems like I can still write values to crust after creating an object with:
const factoryPizza = pizzaFactory("small")
If I understand it correctly, factoryPizza is an object returned by the pizzaFactory function, meaning it has two methods. I don"t understand how this works. The bake() function will print something to the console based on the crust and size variables, but where are they? They are not in the object. How are they staying in the memory? And even worse, I seem to be able to write and change eg the crust variable, even though its a function variable. Do all functions like this load and stay in the memory? I thought that a function runs, does whatever it needs to do before returning a value, returns a value and is then "forgotten". But this doesn't seem to be the case. Or are those values in our factoryPizza object, just somewhat hidden, and the function has indeed ran its course and is no longer in the memory?14 replies
KPCKevin Powell - Community
•Created by tlcheung on 6/9/2023 in #os-and-tools
Naming conventions for setting up projects
Thanks a lot Jochem.
7 replies
KPCKevin Powell - Community
•Created by tlcheung on 6/9/2023 in #os-and-tools
Naming conventions for setting up projects
Are there any industry standard conventions or similar that we can use as a reference for at least some files?
7 replies
KPCKevin Powell - Community
•Created by mediocre coder on 6/21/2023 in #os-and-tools
Question about domain stuff
What would you recommend, using multiple domains like project1.mydomain.com, project2.mydomain.com, etc. or something like mydomain.com/project1, mydomain.com/project2, etc. Is there an actual difference, besides the URL?
4 replies
KPCKevin Powell - Community
•Created by Zenon on 6/19/2023 in #os-and-tools
VCS JS snippets
Moved them to top so I don't have to deal with the random stuff.
22 replies
KPCKevin Powell - Community
•Created by Zenon on 6/19/2023 in #os-and-tools
VCS JS snippets
Perfect, thanks both.
22 replies
KPCKevin Powell - Community
•Created by Zenon on 6/18/2023 in #front-end
Localization: multilingual website
I see. So, if I want to do it the best way possible, I either have to have multiple sites with the content already in the HTML, or I have to do it on the back-end and not in the client for SEO purposes. Thanks a lot all.
19 replies
KPCKevin Powell - Community
•Created by Zenon on 6/19/2023 in #os-and-tools
VCS JS snippets
It certainly does, thanks.
22 replies
KPCKevin Powell - Community
•Created by Zenon on 6/19/2023 in #os-and-tools
VCS JS snippets
How did you know that this was from Emmet? So I can found out this type of information by myself in the future.
22 replies
KPCKevin Powell - Community
•Created by Zenon on 6/19/2023 in #os-and-tools
JS vs HTML/CSS in VS Code
Okay, I tried creating a custom snippet for myself and this is perfect. Cool, thanks.
9 replies
KPCKevin Powell - Community
•Created by Zenon on 6/18/2023 in #front-end
Localization: multilingual website
Cool, I didn't even know about these, now I do. Thanks!
19 replies
KPCKevin Powell - Community
•Created by Zenon on 6/18/2023 in #front-end
Localization: multilingual website
Cool, thanks a lot.
19 replies
KPCKevin Powell - Community
•Created by Zenon on 6/18/2023 in #front-end
Localization: multilingual website
Is that SEO friendly?
19 replies
KPCKevin Powell - Community
•Created by Zenon on 6/18/2023 in #front-end
Localization: multilingual website
Nice, thanks! What are some other approaches. So it can be done by having multiple sites and by doing JS. Are there other ways? Are there any comprehensive tutorials that cover the possibilities and their pros and cons?
19 replies
KPCKevin Powell - Community
•Created by Zenon on 6/12/2023 in #front-end
::before and ::after to create a hamburger icon
Does this server have some sort of +1 or "thanks" I can give you?
31 replies