top of page
Search
  • Writer's pictureWang Sibo

Javascript logic flow (How to think)

in a js file, the basic logic is simply

By understanding this, it is easy to write a javascript file.


First, you need to catch a "element" that you want to control (using queryseletor)

this element can be very abstract, like circle, icons, songs.

Second, applying some builded in method to deal with these elements (like addEventlistenor,)

Third, create some function to carry out what you might want to do.

1 view
bottom of page