Rock, paper, scissors X99

In the rock, paper, scissors x99 project https://www.codecademy.com/paths/create-a-back-end-app-with-javascript/tracks/bapi-javascript-conditionals-and-functions/modules/project-rock-paper-scissors-x-99/informationals/bapi-p1-rock-paper-scissors-x99,

I noticed that there are two main javascript files: view-logic, and game-logic. However, I am confused how they communicate with one another since their are no “require” statements nor are their “export/import” statements in the document. Are they communicating through some functionality of jquery? If it would be helpful to post some code, I would be more than happy.

Thanks,
Thomas

Do they communicate? Start there. And if so, who/what is communicating, and if you know that, then you’ve got the code that is doing the communication, and can therefore see what is being used?

What is the entry-point of the program? What does it do when starting, what is being set up?

If you’re wondering where your code is called for, then you could search your project for mentions of the names of your functions/whatever.

If you’re on linux or mac you can search for text in a directory like so:

$ grep -R sometexttofind

I personally find grep a bit user-unfriendly so something like rg/ag/ack would provide a better searching experience, but grep is almost certainly already installed. It’s less important what you use, and more important to decide to make a text search in your project because after having decided on what to do you can figure out how to go about doing it.

Thanks so much! That answer was very helpful. I used ‘grep’ and found a lot of instances of different functions and variables in a lot of different places. However, I found that the reason that all of my js files are able to communicate is because they are all included in script tags in the html document, and because of this, they do not require node import/export or require.js which is great because those functions are not browser compatible.

Thanks again,
Thomas