Microsoft interview question

Fix an issue in a code where the thread is full and paint (DOM) does not occur until thread is released

Interview Answer

Anonymous

17 Feb 2021

use setTimeout on each iteration of a large-count iterations loop (million) so have a slight delay for the thread to be released so paint can happen