I would like to know something about a code fragment I saw.
In the video he has a variable. And then he puts dot methods underneath each other that keeps manipulating that same beginning variable consecutively. It has spacing in front of it and then chains into lower lines all with . notation in front of it.
The video where I saw it now is this one: https://www.youtube.com/watch?v=1DMolJ2FrNY&list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84&index=4
At exactly the 6 minutes mark he has 3 of those dot methods underneath each other. Where can I find something about that? Cause I don't want to blindly copy the behavior.
This is code from the video:
import fs from 'fs'
var output = fs.readFileSync('data.txt', 'utf8')
.trim()
.split('\n')
.map(line => line.split('\t'))
console.log('output', output)
It is the dot usage here that I'm interested in.