Created
February 13, 2015 22:27
-
-
Save CodeLuca/183a1fa032aea4b6b836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
var r = fs.readFileSync('read'); | |
r = r.toString(); | |
var rArray = []; | |
rArray = r.split(' '); | |
var amount = 0; | |
for(var i = 0; i < rArray.length; i++){ | |
if(rArray[i] == 'node.'){ | |
amount++; | |
console.log('true'); | |
} | |
} | |
if(amount == 0){ | |
console.log('false'); | |
} | |
console.log(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
file that I'm looking at:
hello
my name is
luca
this is a reading file
for node.