ERRORs IN JS
Output: Reference error. As age not found.
2.
map()
is used when we want to output in terms array. return is used.forEach()
is used when we want output line by line. console.log() is used.
3.
This will give Undefined
Output.
As the return is used in a forEach callback function.
The correct way of writing the above code is
Console.log
is used instead of return.
-
If inside callback function argument is not passed. It will give REFERENCE ERROR
as
value not found.
4.
-
Run Time Error
if matrix[]3x3 is there and we do console.log(arr[2][4]). It will give Exception error
Out of bound spaces
as this memory is not allocated.