-
-
Save jonsamp/28823ef8b791de8538d875012776ac05 to your computer and use it in GitHub Desktop.
// Tip Limit counter | |
var tipLimit = 3; | |
// Generate a number | |
function generateNumber() { | |
... | |
} | |
// Generate a tip: | |
// 1. Get random number from generateNumber() | |
// 2. Use the random number to get the tip from the array | |
// 3. Show the tip | |
function generateTip() { | |
var tip = tipsList[generateNumber()]; | |
var tipElement = document.querySelector('.js-tip'); | |
var tipLimitCount = document.querySelector('.tip-limit-count'); | |
tipElement.innerHTML = tip; | |
tipLimitCount.innerHTML = tipLimit; | |
} | |
... | |
// Get the first tip | |
generateTip(); |
I wrote everything properly but nothing appears when I re-open the html file on chrome. It's like all my changes on java file aren't connected to the html despite the source file being on the html file. Can you help please?
Did you unzip the folder when you download it
WassimaG, did you save the changes in the text editor?
I'm stuck too, why are the answers from the earlier steps not translating to this?
me too, have double checked all my entries and can't find the problem. And yes, I have unzipped the file and I have saved the file in my text editor (Atom)
I had the same challenge... but I noticed the page displayed correctly on firefox developer edition... because I used es6 let
to declare the variables, so I changed them to var
and the page displayed on chrome...
so you might wanna try tweaking your file a bit to see what works...
Good :D!