I have long of code function about 100 lines. It's hard to read.
Which is cleaner or better way to separate the function?
First way
function main() {
func1();
func2();
func3();
func4();
func5();
}
Second way
function main() {
// more code here
func1();
}
function func1() {
// more code here
func2();
}
function func2() {
// more code here
func3();
}
function func3() {
// more code here
func4();
}
If no one better, when I should use second way instead of first way?