lesson 1 learn js ES6 mini BC LS

In this example below you will see how to do a lesson 1 learn js ES6 mini BC LS with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 120hit, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 120hit ©
  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>lesson 1 learn js ES6 mini BC LS</title>
  
  
  
  
  
</head>

<body>

  
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/120hit/lesson-1-learn-js-es6-mini-bc-ls-jGWYJQ */
es6-es2015
quokka?

in es6 there is  a thing called "let" in es6 so it cant have the same var(let)
var and let is the same thing, but let is more strict
------
another new concept is called const, whiich is more strict
const name = 'rohit'
name;
'rohit'
-----
const is more strict than let, so let, const is new to es6
so there cant have for ex var x = 'x' and let x = "x" and const x = 'x'

------------------

const name = "rohit";
let age = 22;

age += age 1;
console.log(`Hello, my name is $(name), I am $(age) rotations around the sun old`); //Hello, 

--------------------------------
  typeof is what data is 
  if (typeof name === "string"){
    console.log(`his name is ${age}`);
}

Comments