Comprehensive frontend interview questions covering HTML, CSS, JavaScript, React, Vue, and modern web development practices. Core Web Technologies Fundamental concepts every frontend developer should know: HTML & DOM: Document structure, DOM manipulation, semantic HTML CSS: Box model, flexbox, grid, positioning, …
Read MoreEasy-level frontend interview questions covering HTML, CSS, JavaScript, React, and Vue fundamentals. Q1: What is the DOM and how does it work? Answer: graph TB A[HTML Document] --> B[Browser Parses] B --> C[DOM Tree] C --> D[Document] D --> E[html] E --> F[head] E --> G[body] G --> H[div] H --> I[p] H --> J[span] style …
Read MoreEssential npm commands for Node.js package management. Quick reference for daily development tasks. Installation & Setup 1# Check npm version 2npm --version 3npm -v 4 5# Update npm 6npm install -g npm@latest 7 8# Initialize new project 9npm init 10npm init -y # Skip prompts, use defaults 11 12# Initialize with specific …
Read MoreComplete React guide from project setup to building a functional Todo application. Includes modern hooks, TypeScript, and best practices. Docker Setup Dockerfile 1# Build stage 2FROM node:18-alpine AS builder 3WORKDIR /app 4COPY package*.json ./ 5RUN npm ci 6COPY . . 7RUN npm run build 8 9# Production stage 10FROM …
Read MoreCommon code smells in TypeScript and how to fix them. Using any 1// ❌ Bad 2function process(data: any) { 3 return data.value; 4} 5 6// ✅ Good 7interface Data { 8 value: string; 9} 10function process(data: Data) { 11 return data.value; 12} Not Using Optional Chaining 1// ❌ Bad 2const city = user && user.address && …
Read MoreSecure coding practices for TypeScript applications. XSS Prevention 1// ❌ Vulnerable 2function displayMessage(message: string) { 3 document.getElementById('output')!.innerHTML = message; 4} 5 6// ✅ Secure 7function displayMessage(message: string) { 8 const element = document.getElementById('output')!; 9 …
Read MoreTools for checking vulnerabilities in TypeScript/JavaScript code. npm audit 1# Check vulnerabilities 2npm audit 3 4# Fix automatically 5npm audit fix 6 7# Force fix (may break) 8npm audit fix --force 9 10# JSON output 11npm audit --json Snyk 1# Install 2npm install -g snyk 3 4# Authenticate 5snyk auth 6 7# Test project …
Read MoreComplete Vue.js 3 guide from project setup to building a functional Todo application. Includes Composition API, TypeScript, and best practices. Docker Setup Dockerfile 1# Build stage 2FROM node:18-alpine AS builder 3WORKDIR /app 4COPY package*.json ./ 5RUN npm ci 6COPY . . 7RUN npm run build 8 9# Production stage …
Read MoreYarn package manager for JavaScript/Node.js projects. Installation 1# Via npm 2npm install -g yarn 3 4# Via Corepack (Node.js 16.10+) 5corepack enable 6corepack prepare yarn@stable --activate 7 8# Verify 9yarn --version Basic Commands 1# Initialize project 2yarn init 3yarn init -y # Skip questions 4 5# Install …
Read More