Skip to main content

Exercise 25

  • Create a new index25.js file
  • We'll define a super hero character using variables and values
  • Use the right data type for each variable
    • Variable name: superHeroName, value: Batman
    • Variable name: name, value: Bruce Wayne
    • Variable name: fly, value: false
    • Variable name: hasBatmobile, value: true
    • Variable name: life, value: (value between 0 and 100)
    • Variable name: freeTime, value: null
  • Show each value using console.log() with the variable name (string) as first parameter and the actual variable value as second
  • Example: console.log('name', name);
  • Also show the variable names and the type of value it has assigned (use typeof)