The fileExistsSync function is a wrapper around the existsSync function, that checks if a file exists. The fileExistsSync should be exported and available in other files by the same name. Currently, the fileExistsSync function crashes because the file system is not imported properly. It also looks like the function is not properly exported.
Any file like sample.js, sample.txt, etc.
true
The above mentioned example is a sample test case for your understanding. The program will be tested on other secret test cases in the backend. Make sure you click the SUBMIT button to save and
Expert in Data Structures & Algorithms. Building tools to help developers crack FAANG interviews.