#help in understanding how to code certains things
52 messages · Page 1 of 1 (latest)
somewhat rude to just copy-paste your (homework-)exercise here and not even bothering to write one single word from yourself, then to expect us to just give you the solution? Just ask chatGPT and you get the result, but obviously you don't learn a single thing by doing that...
I am currently failing the class so it's not really rude when I am asking people for help who are experienced cause I kinda thought that's what this server is for
Alot of things but idk if I'm doing it right I have code I can show
I am currently failing the class
One preliminary question in that case: is this your only CS related course in your curriculum?
No I have another coding course but it's not even hard this teacher is strict I put in alot of effort to make a working app for him and he failed me because some code wasn't to his liking I can't even ask him anything because he won't reply when he's with his kid
Okay. Asking because I have seen first-handedly students winging CS courses only to fail a few semesters later, because they were missing the basics, which then amounted to a huge waste of their time as they had to drop out at that point.
This server is indeed meant for help. But to help with specific questions and to overcome obstacles. By just dropping your exercise here verbatim you make it look like you want strangers to do your work for you. Which is seen regularly here and not well received.
Start of with what code you have, what you tried, how you approached the problem, and from there on people will usually be able to guide you towards a solution.
OK yeah I get that but like I have 0 clue on what I'm doing and I need help that's why I'm asking I thought if I post it people can guide me
I have gotten 0 help from anyone and I get called rude for posting about getting help that's not even half my homework I have a whole list of shit
if you are at the very beginning of your coding journey, I'd recommend checking #faq where you can find several resources that guide you through JS principles. If you get stuck or have specific questions, then you are of course welcome to ask back.
I believe so
depends mainly on you
Uh huh
const tiger = (function() {
const weight = 90; // kg
const covering = "Fur";
const length = 3.3; // meters
const diet = ["Deer", "Wild pigs", "Buffalo"];
const predators = ["Humans", "Crocodiles"];
const habitat = "Tropical and subtropical forests";
const isEndangered = true;
const source = "https://en.wikipedia.org/wiki/Tiger";
return {
weight,
covering,
length,
diet,
predators,
habitat,
isEndangered,
source,
};
})();
// Displaying tiger information on a web page using HTML and JavaScript
document.getElementById("weight").innerHTML = tiger.weight + " kg";
document.getElementById("covering").innerHTML = tiger.covering;
document.getElementById("length").innerHTML = tiger.length + " meters";
document.getElementById("diet").innerHTML = tiger.diet.join(", ");
document.getElementById("predators").innerHTML = tiger.predators.join(", ");
document.getElementById("habitat").innerHTML = tiger.habitat;
document.getElementById("isEndangered").innerHTML = tiger.isEndangered;
document.getElementById("source").href = tiger.source;
Please add proper formatting and syntax highlighting to your code. Check #faq on how to do that. It really helps to read and understand your code and increases the chances of someone jumping in to help.
<script src="tiger.js"></script>
</head>
<body>
<h1>Tiger Information</h1>
<ul>
<li>Weight: <span id="weight"></span></li>
<li>Covering: <span id="covering"></span></li>
<li>Length: <span id="length"></span></li>
<li>Diet: <span id="diet"></span></li>
<li>Predators: <span id="predators"></span></li>
<li>Habitat: <span id="habitat"></span></li>
<li>Is endangered: <span id="isEndangered"></span></li>
<li>Source: <a id="source" href=""></a></li>
</ul>
</body>
</html>
-.-bruh
I can see why you're failing...
-
you're asking people to spend their free time helping you at no cost. be respectful of other people's time. actually ask a question and show the effort you've already put in, instead of just dumping your homework question here and saying "help". you failing your class means nothing to us. we... don't... care... if you want help, treat people like you appreciate their time, not like you are owed their time. also, to make it easier for folks to help, format your question in an easy-to-read-and-follow manner. this includes syntax highlighting, which is incredibly simple to do.
-
you were pointed to #faq multiple times. this not only teaches you how to share code on Discord (see above) but also has a curated list of resources to help you learn JS. schools are terrible at teaching JS. as is evident from your sample code, you are being taught outdated methods and should take some time to review proper sources (if you actually care about learning the language).
-
https://phoenix35.js.org/good-practices.html#correct-use-of-js-in-the-browser
i wasn't judging your need of help, i was judging you just pasting your excercise-task without any more comments by you. Like, just posting a photo you took from the letter you got from your prof.
Please add a little more information e.g. what you tried so far, where your problem of understanding lies etc
My problem is all of it I'm so vonfuseddd I've used different apps but he's failed me on them because they weren't right and I posted that in 5 different servers most the poeple would help me for 10 mins than dip
I posted it so poeple will respond than I tell them what I have and haven't done
Post in advance what you already have, so people know if and how they can help you.
Again, as @shut ember said, we are here to help you LEARN TO CODE IN JS, which is sometimes something different than SOLVING YOUR SCHOOL HOMEWORK/EXERCISE. If you have a terrible school/teacher, you suffer like 90% of studens who need to learn web-tech. You are not the exception, you are within the majority. What sets students apart is if they are willing to learn JS at home in their free time despite what's going on and needed at school.
The confusion might also come from you thinking that learning JS by a regular school is like any other school subject. It straight isn't. If you want to learn JS and wqeb-tech, you must additionaly learn outside of the school. And we have really excellent ressources for that in our curated #faq . We can't help you more, you need to sit down, get some tea and start reading through the basics.
my problem is all of it
this indicates you didn't bother reading any of the course material. go do some work.
I did my teacher put up videos but they don't explain alot of it
Okay, but we're not here to lament your curriculum, but to answer your JS-related questions. As Agoknee has mentioned, we're not offering a paid service, so we're a lot more inclined to help if you can state your business in a way that doesn't require us to fight our way through your text/ try to oracle what the problem is.
The code above looks mostly good at core. (Again: add syntax highlighting. I will default to not reading walls of code if it is not formatted correctly, because it's pain to do.)
What seems to be the issue with the code you posted?
then start reading the resources in #faq
But the faq isn't what I need for this project
it is... but, the issue with your code is solved by following the advice at the link I pasted above.
I'm not sure if it's the right way to put it like I have to do the loop array and stuff but I'm not sure if I did that
loop array? there are zero loops in your code
I posted above what I need did I do any of them in the code?
as Len said, your code mostly works. you're just missing something I've now pointed out twice.
hint: the HTML elements don't exist when your code runs
Huh
the order of things is:
learn to code => look at your exercise => solve the exercise
what you are trying to do is:
look at your exercise => solve the exercise => learn to code (somewhere in the future)
and that's not working in any reality.
OK that's why I'm asking for help from poeple who know what they are doing I searched html and Java help servers and thos popped up
java is not javascript
you also seem to be missing the point we're all trying to make
and that'd be a confirmation... no, the point is how you ask for help...
I've sent code that's what was asked I asked how would I put the other elements and was just told to go to faq
is that really the only advice you've been given?
Yes
okay.