Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 8-type-checker.js
  • Loading branch information
MA-Hussein authored Sep 24, 2019
commit e26255d64a4b57dad854c177721cc2de2604fa58
10 changes: 5 additions & 5 deletions Week1/Js-exercises/8-type-checker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

"use strict";
let var1 = "customers";
let var2 = "suppliers";
let var3 = {storeName:"mainStore",storeId:001};
let var4 = {itemName:"laptop",itemId:0200};
const var1 = "customers";
const var2 = "suppliers";
const var3 = {storeName:"mainStore",storeId:001};
const var4 = {itemName:"laptop",itemId:0200};


console.log(typeof var1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for implementation but you could use const instead of let here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Expand Down Expand Up @@ -59,4 +59,4 @@ if (typeof var1 !== typeof var2){
console.log("They are not the same type");
}else {
console.log("These two variables have the same type")
};
};