JavaScript Variable Declare and Assign

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <title>JavaScript Variable assign same value</title>
</head>
<body>
<pre>   <!-- Use pre element for work document.writeln() method -->
<script type="text/javascript">

  var a = "hello";
  var b;
  var c;

  document.writeln("a : " + a);
  document.writeln("b : " + b);
  document.writeln("c : " + c);

</script>
</pre>
</body>
</html>

Run it...   »

Example Result