Posts

SASS vs SCSS in CSS

Image
SCSS and SASS is a preprocessor that lets you use features that aren't a part of the wider CSS standard ye t. and provides better workflows for maintaining your stylesheets. SASS SASS (Syntactically Awesome Stylesheets) is a CSS pre-processor that lets you use  variables, mathematical operations, mixins, loops, functions, imports, and other interesting functionalities that make writing CSS much more powerful. In some ways, you may think of SASS is a style sheet extension language because it extends the standard CSS characteristics by introducing the benefits of a basic programming language. So SASS will compile your code and generate the CSS output a browser can understand. SCSS SCSS is the main syntax for the SASS which builds on top of the existing CSS syntax. It makes use of semicolons and brackets like CSS (Cascaded Style Sheets) List down the main difference between SAAS and SCSS. SASS  is used when we need an original syntax. SASS follows strict indentation. SASS has a l...

Call Stack in JavaScript with examples

Image
  Summary  in this tutorial, you will learn about the JavaScript Call Stack which is a mechanism to keep track of the function calls. Introduction to JavaScript Call Stack JavaScript engine uses a  call stack  to manage exection context the Global Execution Context and Function Execution Contexts. The call stack works based on the LIFO principle i.e., last-in-first-out. When you execute a script, the JavaScript engine creates a Global Execution Context and pushes it on top of the call stack. Whenever a function is called, the JavaScript engine creates a Function Execution Context for the function, pushes it on top of the Call Stack, and starts executing the function. If a function calls another function, the JavaScript engine creates a new Function Execution Context for the function that is being called and pushes it on top of the call stack. When the current function completes, the JavaScript engine pops it off the call stack and resumes the execution where it ...

Objects in JavaScript

Other programming languages have complex definition about object but in javascript have a simple definition about object. In JS object is a collection of name and value pairs. Example const address = { street: “main”, number: 100, apartment: { floor: 5, number: 300 } } Above example address is a object and (street, number, apartment ) is name and (main, 100 {floor: 5, number: 300} ) are values.. the apartment is it self object its name and value pairs are (floor, number), (5, 300)...

Every JS developer should know these concepts.. Syntax Parsers, lexical Enviroments and Execution context

Syntax parsers  A program that ready your code and determines what it does and if its grammer is valid. Your code is not magic. Someone else wrote a program to translate it for the computer.. Lexical Enviroment  Where something sits physically in the code you write.. lexical meand having to do with words or grammer. A lexical environment exists in programming languages in which where you write something is important.. Execution Context  A wrapper to help manage the code that is running.. There are lots of lexical environments. Which one is currently running is managed via execution contexts. It can contain things beyond what you are written in your code.