Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
/* Get Programming with JavaScript
 * Listing 2.06
 * Declaring and assigning in two steps
 */
var playerName;
var locationName;
playerName = "Kandra";
locationName = "The Dungeon of Doom";
console.log(playerName + " is in " + locationName);
/* Further Adventures
 *
 * 1) Declare a score variable.
 *
 * 2) Assign it a value.
 *
 * 3) Display an extra message on the console,
 *    by combining variables and strings, to say
 *    something like "Kandra has a score of 100"
 *
 */
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jrlarsenpro
0viewers