MODULE 3 JAVASCRIPT QUESTIONS
AND ANSWERS
Declare a variable - ANSWER-let name; (can reassign)
const name; (constant)
Number type - ANSWER-64-bit double-precision value (like double)
add exponets - ANSWER-123e4
123e-4
print out - ANSWER-console.log( );
Template literals - ANSWER-are strings delimited by back-tick (`) or
surrounded by ${...}
String length and substrings - ANSWER-.length
.substring
Objs in JS - ANSWER-key-value pairs
undefined - ANSWER-value that is not declared
NOT === to null (absence of value)
converts to String - ANSWER-.toString( )
converts number to String with specified decimal - ANSWER-.toFixed(#)
return for "not a number" - ANSWER-NaN
equal to
strictly equal to - ANSWER-==
===
shadowing - ANSWER-The inner scope variable "shadows" the outer scope.
adds a new element to the end of an array - ANSWER-push( )
adds a new element to the beginning of an array - ANSWER-unshift( )
removes an element from the end of the array - ANSWER-pop( )
AND ANSWERS
Declare a variable - ANSWER-let name; (can reassign)
const name; (constant)
Number type - ANSWER-64-bit double-precision value (like double)
add exponets - ANSWER-123e4
123e-4
print out - ANSWER-console.log( );
Template literals - ANSWER-are strings delimited by back-tick (`) or
surrounded by ${...}
String length and substrings - ANSWER-.length
.substring
Objs in JS - ANSWER-key-value pairs
undefined - ANSWER-value that is not declared
NOT === to null (absence of value)
converts to String - ANSWER-.toString( )
converts number to String with specified decimal - ANSWER-.toFixed(#)
return for "not a number" - ANSWER-NaN
equal to
strictly equal to - ANSWER-==
===
shadowing - ANSWER-The inner scope variable "shadows" the outer scope.
adds a new element to the end of an array - ANSWER-push( )
adds a new element to the beginning of an array - ANSWER-unshift( )
removes an element from the end of the array - ANSWER-pop( )