Jump to content
Killersites Forums

DanhBui

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DanhBui

  • Rank
    New member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey everybody, I'm a beginner at JavaScript so there are many things I don't understand. I'd appreciate very much if you can help me figuring out something new. I'm trying to solve this problem on Checkio.org called "The Most Numbers". The requirement is quite simple: It is given an array of floats and you have to calculate the difference between the maximum and minimum numbers. And this is my solution (which didn't work): function mostNumbers(numbers){ if (numbers.length > 0) { return Math.max(numbers) - Math.min(numbers); } else { return 0;} } It produc
  2. Hi Stef, I'm very happy that you answered me directly. But I think you misunderstood what I meant because I didn't say it very clearly. I watched you reseting the value of the button in Chapter 7 - lesson 3 of the course and this is what happened when I run your code: At first, the text in the button was "Do it again!" After I clicked on the button, in turned into "Done looping!" like this: But I knew what I did wrong. I just took a good look at your code and found out that you used "input", not "button", and you set the value of the "input" tag to "Do it again!".
  3. Hello everybody, I'm taking Stef's "Beginners JavaScript" course and saw how he set different text that appears inside the buttons. However when I tried it myself, nothing happened. I've checked many times but still couldn't find out what I did wrong. Below is my code, please help me fix it. Thank you very much! - Here's the image version (to make the code less boring and easier to read compared to the text version) Here's the code in my html file: Here's the code in my external js file: - And here's the text version in case you need to copy: <button
×
×
  • Create New...