DASHA
This commit is contained in:
		
							
								
								
									
										19
									
								
								Асинхронность в Node.js/app.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Асинхронность в Node.js/app.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| function displaySync(callback) { | ||||
|     callback(); | ||||
| } | ||||
|  | ||||
| console.log('Начало работы программы'); | ||||
|  | ||||
| setTimeout(function () { | ||||
|     console.log('timeout 500'); | ||||
| }, 500); | ||||
|  | ||||
| setTimeout(function () { | ||||
|     console.log('timeout 100'); | ||||
| }, 100); | ||||
|  | ||||
| displaySync(function () { | ||||
|     console.log('without timeout'); | ||||
| }); | ||||
| console.log('Завершение работы программы'); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 User1
					User1