Monday, August 23, 2021

How javascript works?

 





Every browser has it's own engine.ex:v8 for google chorome.  First own code hoisted into JavaScript engine and a parser parse it ,read code line by line and checks if it is correct or not .Because parser knows the JavaScript rules, If the code is syntactically correct then it parsed to a abstract syntax tree. Then the AST is converted to machine code. After converting to machine then executed my computer processor.

No comments:

Post a Comment

Abstract factory pattern

When single task can be done by multiple groups/family of objects and decision is taken at the runtime.