Why JS cannot find the function in babel script?
Here’s my index file <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="description" content="test"> <title>test</title> </head> <body> <!– <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/dist/tf.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/fetch-polyfill@0.8.2/fetch.js"></script> –> <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> <script src="/app.js" type=’text/babel’></script> <script type="text/javascript"> fnc(); </script> </body> </html> And here’s app.js file function fnc() { console.log(‘myname’); } I wonder why console says: Uncaught ReferenceError: fnc is not… Read More Why JS cannot find the function in babel script?