Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>JS Bin</title>
  </head>
  
  <body>
    
  </body>
</html>
 
// declare a variable and store a string inside of it
const color = "green"
// console log is used print values to the console
// here we are printing the value stored in the 
// color variable to the console
console.log(color)
// get the length of characters of the string value stored 
// in the color variable using the .length method 
// and print result in the console
console.log(color.length)
// convert string value stored in color to uppercase 
// using .toUpperCase method and print result in the console
console.log(color.toUpperCase())
// concantenate strings by adding a plus sign to 
// combine multiple strings together
console.log(`${color} eggs and ham`)
// check if value stored in color includes the substring "ree"
// and print result t the console
console.log(color.includes('ree'))
Output

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

Dismiss x