01. What are truthy and falsy values?
Truthy values: Any numbers value truthy others than 0 and any string values truthy other than an empty string.
Falsy values: Any variable values likes(false,empty string, 0, undefined, nul, NaN)called falsy valuse.
02. What is the difference between null and undefined?
Undefined: Unintentionally missing values. undefined is negative/falsy values. undefined is variable declared but not the value set and function explicitly not a return value or function call but not parameters pass, and any object property access but this property not in an object this called undefined. undefined means a variable has been declared but not defined yet.
Null: Intentionally missing values called a null. and null is an assigned value. It means nothing.
double equal (==): Used for comparing two variables, but it ignores the data type of the variable.
triple equal(===): Used for comparing two variables, but this operator also checks data type and compares two values.
04. What is hoisting?
Hoisting: Hoisting is any declaration variable moved to the top of the function. like (var variable).
05. What is block Scop?.
06. What is the window?.
requests, test scripts, and environments. Global variables
are available throughout a workspace.
07. What is “this” keyword?.
this keyword: “this” is a special keyword that allows you to access a certain object directly in the current scope, no matter where your current function is. By default, it refers to the global object. Js, it’ll be global and in Browser, it’ll be a window.
08. What is setTimeout() ?.
setTimeout: The setTimeout() method calls a function or evaluates an expression after a specified number of milliseconds. like: 1000 ms = 1 second.The function is only executed once.
09. JavsScript synchronous or asynchronous?.
10. What is setInterval()?.
setInterval(): The setInterval() method repeats a given function at every given time interval. function call again and again.