Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JavaScript Interview Questions for freshers

var a = 3
var a = 4

console.log(a) // 4 as var variables can be redeclared + updated

let b = 3
let b = 4

console.log(b) // Syntax Error as let variables cannot be redeclared

// If we just do, it will work because it can be updated
b = 4 

const c = 3
const c = 4

console.log(c) // Syntax Error as const variables cannot be redeclared or updated

const d

// Will this throw an error? Go through the table and try to find the answer.
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript converting an array into a map 
Javascript :: get all matches regex javascript 
Javascript :: post api in next.js 
Javascript :: javascript do while 
Javascript :: js how to convert vh to pixel 
Javascript :: react increment multipying button click 
Javascript :: concat class name vue js 
Javascript :: .text javascript 
Javascript :: javascript store value in array 
Javascript :: date format date and time in js 
Javascript :: append to map javascript 
Javascript :: what is the difference between let and const in javascript 
Javascript :: pdf to json online 
Javascript :: Round date to future 5min 
Javascript :: string length in javascript 
Javascript :: fizzbuzz javascript 
Javascript :: React Native typescript start new project 
Javascript :: base 2 number javascript 
Javascript :: Datatable with static json data source 
Javascript :: silent keylogger browser 
Javascript :: handle onchange react 
Javascript :: convert js date time to mysql datetime 
Javascript :: get second element with a class jquery 
Javascript :: moment 
Javascript :: invoking jquery validator 
Javascript :: vue js datetime convert 
Javascript :: getting values for metaboxes in wordpress 
Javascript :: find max value in array javascript 
Javascript :: date now javascript 
Javascript :: how to test if an element has a class in testing library 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =