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.07
 * Declaring and assigning in one step
 */
var playerName = "Kandra";
var locationName = "The Dungeon of Doom";
console.log(playerName + " is in " + locationName);
/* Further Adventures
 *
 * 1) Declare a health variable and assign it
 *    a value in one step.
 *
 * 2) Declare a message variable.
 *
 * 3) Assign message a value created by joining
 *    variables and text to say something like
 *    "Kandra has health 50 and is in The Dungeon of Doom"
 *
 * 4) Replace the current console.log statement
 *    with a new one to display the message variable.
 *
 */
Output

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

Dismiss x
public
Bin info
jrlarsenpro
0viewers