9 lines
317 B
JavaScript
9 lines
317 B
JavaScript
const fs = require("fs")
|
|
const forwardRegex = /XMAS/g
|
|
const input = fs.readFileSync("input.txt","utf-8")
|
|
const inputArr = input.split("\n")
|
|
console.log(inputArr)
|
|
// const forwardMatchs = input.match(forwardRegex)
|
|
// console.log(input)
|
|
// console.log(forwardMatchs.length)
|
|
//create a sliding window to match the words
|