React.js Topics
Day 21:
- Setting up development environment
- CRA : Create React App
- Folder structure
- Entry point
- npx create-react-app <app Name>
- npm start
- Ctrl + c
- Index.html
- App.css
- App.js
- Index.css
- Index.js
React.js Topics
Day 21:
React.js Topics
Day 20:
React.js Topics
Day 19:
JavaScript Topics
Day 18:
JavaScript Topics
Day 17:
JavaScript Topics
Day 16:
Task:
Write an arrow function called calculateArea
that takes the radius
of a circle as a parameter and returns the area of the circle. Use the formula: Area=π×radius2. Assume that π (pi) is approximately 3.14.
Write an arrow function called power
that takes two parameters: a base (x
) and an exponent (y
). If no exponent is provided, default it to 2
. The function should return the result of raising the base to the exponent.
Interview Questions:
1. How do arrow functions differ from regular functions in terms of syntax and behavior?
2. Explain the concept of lexical scoping and how it applies to arrow functions.
3. What is the main advantage of using arrow functions over traditional functions?
JavaScript Coding Interview Q. No. 01/10: console . log ( "1" + "4" + "1" ) // 141 console . ...