
JavaScript Fundamentals
Variables, types, functions, arrow functions, destructuring, spread operator, template literals
1What is the main difference between var and let in JavaScript?
What is the main difference between var and let in JavaScript?
Відповідь
The fundamental difference lies in variable scope. let has block scope, meaning a variable declared with let only exists within the block where it is defined (between curly braces). var has function scope, which can cause unexpected behaviors because the variable is accessible outside the block. This scope difference makes let the recommended choice to avoid bugs related to hoisting and scope.
2When should const be used instead of let to declare a variable?
When should const be used instead of let to declare a variable?
Відповідь
const should be used when a variable will never be reassigned after its initial declaration. It is good practice to declare all variables with const by default, then switch to let only if reassignment is needed. This makes the code more predictable and helps understand the developer's intent. Note: const prevents reassignment but not modification of object properties.
3What are the primitive types in JavaScript?
What are the primitive types in JavaScript?
Відповідь
JavaScript has seven primitive types: string for character strings, number for integers and decimals, boolean for true and false values, undefined for uninitialized variables, null to represent intentional absence of value, symbol to create unique identifiers, and bigint for large integers. Primitive types are immutable and compared by value, unlike objects which are compared by reference.
What is the difference between null and undefined in JavaScript?
Which operator should be used to strictly compare two values in JavaScript?
+17 питань зі співбесід
Інші теми співбесід Vue.js / Nuxt.js
Modern JavaScript (ES6+)
Vue Basics
Vue Components
Vue Router
Pinia State Management
Vuex (Legacy)
Composition API
Vue Reactivity
Nuxt Fundamentals
Nuxt Data Fetching
Nuxt SSR & SSG
Nuxt Server Routes
Nuxt Modules
Vue Composables
Vue Forms & Validation
Nuxt State Management
Vue Testing
Nuxt Deployment & CI/CD
Vue Performance
Vue Advanced Patterns
TypeScript with Vue
Nuxt Authentication
SEO with Nuxt
Nuxt Internationalization
Vue Architecture
Nuxt Security
Vue Ecosystem
Migration Vue 2→3 & Nuxt 2→3
Опануй Vue.js / Nuxt.js для наступної співбесіди
Отримай доступ до всіх питань, flashcards, технічних тестів, вправ code review та симуляторів співбесід.
Почни безкоштовно