JS1 ClassNotes
JS1 ClassNotes
use console in any browser or just open one of your projects and use that
the code is not permanent, we can use the up & down arrow to bring back old code
Setting up VS Code
It is a free & popular code editor by Microsoft
we'll use the chrome developer tools console to write our code
but not for long terms as afterwards we will start to use js file
like we used for css
Our 1st JS Code
Console.log is used to log (print) a message to the console
console.log(“Apna College”);
Variables in JS
Variables are containers for data
radius
14
memory
Variable Rules
Variable names are case sensitive; “a” & “A” is different.
let : Variable cannot be re-declared but can be updated. A block scope variable.
Number
Follow
Boolean
Let‘s Practice
Qs1. Create a const object called “product” to store information shown in the picture.
Let‘s Practice
Qs2. Create a const object called “profile” to store information shown in the picture.