We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e43db6d commit df416edCopy full SHA for df416ed
2 files changed
Node.js/008_NodeJs/app.js
@@ -0,0 +1,4 @@
1
+// To import use require and store in local variable
2
+// ./ means current directory
3
+var movies = require('./movies');
4
+movies.avatar();
Node.js/008_NodeJs/movies.js
@@ -0,0 +1,13 @@
+//Usually want to break up code into different files to better organize
+//All movie related code can go here
+//Other files can include this code
+function printAvatar(){
5
+ console.log("Avatar: PG-13");
6
+}
7
+
8
+function printChappie(){
9
+ console.log("Chappie: R");
10
11
12
+//What gets exported is determined by 'module.exports' variable
13
+module.exports.avatar = printAvatar;
0 commit comments