Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    Hmmmmm.... Can you give me an example? I'm still not completely sure how I should use it
  2. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    Nope, I thought u needed to use let to declare something.
  3. yumedoll

    JavaScript Why is the placement of the declaration of my let variables being misinterpreted?

    So you're saying I need to place the entire script within a function? Because last time I checked if u declare variables within a function, it stays within that function. But I need to use my variables throughout the entire script though. I don't mind doing it but I'm just asking so u can let me...
  4. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    I actually tried that, I declared it outside of the window.onload but it didn't work either. So I moved it back in.
  5. yumedoll

    JavaScript Why is the placement of the declaration of my let variables being misinterpreted?

    I thought there are already break points in my switch statement? ondrop: function (event) { var draggableElement = event.relatedTarget; // do something when the draggable element is dropped into the dropzone var cls = draggableElement.classList; switch(true){ case...
  6. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    Omg i just noticed that, let me fix it and give it a try tysm EDIT: I fixed it but still no change 😐
  7. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    https://yumekawahanachi.neocities.org/cakebake/functionalint.js I did, it didn't work though😕 Also I like ur pfp it's adorable
  8. yumedoll

    JavaScript Why is the placement of the declaration of my let variables being misinterpreted?

    I don't understand what you mean by that? I'm declaring new variables and initiating them as zero.
  9. yumedoll

    JavaScript Why is the placement of the declaration of my let variables being misinterpreted?

    I tried that like this: let mixamnt = 0; let flouramnt = 0; let sugaramnt = 0; let cocoaamnt = 0; let milkamnt = 0; let eggamnt = 0; let butteramnt = 0; let redamnt = 0; let vanillaamnt = 0; In fact that was how the original script was like before I attempted declaring them together, still...
  10. yumedoll

    JavaScript Why is the placement of the declaration of my let variables being misinterpreted?

    I have declared a few variables for a game I'm making about baking a cake and the variables will act as indicators of the amount of each ingredient to decide the outcome of the cake. let mixamnt = flouramnt = sugaramnt = chocoamnt = milkamnt = eggamnt = butteramnt = redamnt = vanillaamnt =...
  11. yumedoll

    JavaScript Why is the placement of the first declaration of my let variable being misinterpreted?

    I have declared a few variables for a game I'm making about baking a cake and the variables will act as indicators of the amount of each ingredient to decide the outcome of the cake. let mixamnt = flouramnt = sugaramnt = chocoamnt = milkamnt = eggamnt = butteramnt = redamnt = vanillaamnt = 0...
Back
Top Bottom