promise의 이해1
promise의 이해1 func1 () . then ( func2 ) . then ( func3 ) . then ( func4 ) . then ( func5 ) . then ( func6 ) . then ( func7 ); function func1 (){ return new Promise (( resolve , reject ) => { console . log ( 'func1실행' ); setTimeout ( resolve , 2000 ) }) } function func2 (){ return new Promise (( resolve , reject ) => { console . log ( 'func2실행' ); setTimeout ( resolve , 2000 ) }) } function func3 (){ return new Promise (( resolve , reject ) => { console . log ( 'func3실행' ); setTimeout ( resolve , 2000 ) }) } function func4 (){ console . log ( 'func4실행' ); } function func5 (){ console . log ( 'func5실행' ); } function func6 (){ return new Promise (( resolve , reject ) => { console . log ( 'func6-1실행' ); //setTimeout(resolve, 2000); func6_1...