JavaScript1 Notes for beginners Notes.pdf

1,653 views 10 slides Feb 06, 2024
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Javascript Basic Notes


Slide Content

What is JavaScript?
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 codeApna College
JS is a programming language. We use it to give instructions to the computer.
Output
Input (code)
Computer

Setting up VS Code
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
It is a free & popular code editor by MicrosoftApna College

Our 1st JS CodeApna College
console.log(“Apna College”);
Console.log is used to log (print) a message to the console

Variables in JS
Variables are containers for data
memory
radius
14Apna College

Variable RulesApna College
Variable names are case sensitive; “a” & “A” is different.
Only letters, digits, underscore( _ ) and $ is allowed. (not even space)
Only a letter, underscore( _ ) or $ should be 1st character.
Reserved words cannot be variable names.

let, const & varApna College
var : Variable can be re-declared & updated. A global scope variable.
let : Variable cannot be re-declared but can be updated. A block scope variable.
const : Variable cannot be re-declared or updated. A block scope variable.

Data Types in JS
Primitive Types : Number, String, Boolean, Undefined, Null, BigInt, SymbolApna College

Number
Follow
String
BooleanApna College

Let‘s Practice
Qs1. Create a const object called “product” to store information shown in the picture.Apna College

Let‘s Practice
Qs2. Create a const object called “profile” to store information shown in the picture.Apna College
Tags