Frontend Interview Questions
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: DOM (Document Object Model): Tree-like representation of HTML document that JavaScript can manipulate. DOM Manipulation 1// Select elements 2const element = โฆ
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 โฆ
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