menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Exploring ...
source image

Dev

5d

read

378

img
dot

Image Credit: Dev

Exploring JavaScript Fundamentals and a Simple React Project

  • JavaScript fundamentals were explored, focusing on function declaration vs function expression, hoisting, function composition, and a small React project.
  • Function Declaration uses the function keyword, is hoisted, and can be called before its definition.
  • Function Expression assigns a function to a variable, is not hoisted, and must be defined before being accessed.
  • Hoisting moves variables and function declarations to the top of their scope before code execution.
  • Function composition combines functions for clean, reusable, and modular code.
  • A mini React project was demonstrated, toggling a light bulb image or text from ON to OFF using a ternary operator and the useState hook.

Read Full Article

like

22 Likes

For uninterrupted reading, download the app