123456789101112131415161718192021 |
- const fs = require('fs')
- let data = fs.readFileSync('./Day 3/data.txt', 'utf8');
- var start = 0
- var right = 3
- var down = 1
- var tree = '#'
- let lines = data.split('\n')
- let linelength = lines[0].length - 1
- let totalLines = lines.length
- let dataArray = data.match(/.{1,31}/g)
- let stringSplit = data.split('')
- let map = lines.map(stringSplit)
- console.log(map)
|