Kayıtlar

Notes of Course

Resim
  1. "Undefined, null and empty values" " var Jane Smith console.log(Jane Smith); " Above example is given at that topic for the result "undefined" but it doesn't work as wanted. Instead it outputs "undefined" with that input: " var JaneSmith console.log(JaneSmith); " The only difference between them is the space used between 'Jane' & 'Smith'. Why is that? 2. "var" Problem What is the problem with the last part, when we name the function a "var", it should work. Code works until then, but after naming it with a variable it says "undefined".

Now here catch code itself is the reason of bug

Resim
                                                                       Output is 55

Guess how many of them run when you extract the comments?

Resim
 

A Good Sentence From Coursera Course

 " Since the  arr.length  counts the number of items in the array from one, and the array items are indexed from zero, this effectively means that as soon as  i  is equal to  arr.length , the loop will finish and any other code after it will be run."