Sirush's Random Quote Machine :)


Hi, what do you say about this :question: :slightly_smiling_face:

toooo much of unnecessary code in every part… check this out its not any kind of instruction , but smth to think abt :slight_smile:

Annestezia, thank you for attention. :wink:
But what you see unnecessary? In style or in JS? :slightly_smiling_face:

Its in every part: html css js, so its at approach level

  • notice how similar is ur code for every quote, you could create 1 box in html with a button, p and anything you want , output random quote there and add a desired class ,
  • in ur classes the only thing that changes is color, this could be a good place for some refactoring too)
  • as for js just like @camperextraordinaire said theres no need to write 10 event handlers

Programming is meant to automate things and make you write less but in more hmm inventive way
Imagine what if there were 1000 quotes :scream:
“Everything should be made as simple as possible, but not simpler.” :wink:

@camperextraordinaire I added the loop. It didn’t work before, :rofl: maybe i was wrote it with mistake. So, thank you very much! :+1:

@Annestezia I’m beginner and your advices important for me. Thank you a lot :wink:

1 Like

you will get there eventually, be strong , my friend :vulcan_salute: :smile: