Advertisement
sissou123

Untitled

Mar 18th, 2022
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. JavaScript Algorithms and Data Structures
  2. Basic JavaScript
  3. Understanding Uninitialized Variables
  4. When JavaScript variables are declared, they have an initial value of undefined. If you do a mathematical operation on an undefined variable your result will be NaN which means "Not a Number". If you concatenate a string with an undefined variable, you will get a literal string of undefined.
  5.  
  6. Initialize the three variables a, b, and c with 5, 10, and "I am a" respectively so that they will not be undefined.
  7. // Only change code below this line
  8. var a;
  9. var b;
  10. var c;
  11. // Only change code above this line
  12.  
  13. a = a + 1;
  14. b = b + 5;
  15. c = c + " String!";
  16. for more:• https://www.clictune.com/ex7f
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement