Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

programming language

Rating
-
Sold
-
Pages
3
Uploaded on
19-02-2024
Written in
2022/2023

I delve into the fundamentals of JavaScript, focusing on its Document Object Model (DOM) and basic programming concepts. Join me on a journey through JavaScript's core principles, and discover how to leverage DOM for dynamic web development. Whether you're a beginner or looking to reinforce your programming skills, this tutorial provides a clear and engaging overview of JavaScript essentials, accompanied by practical examples to enhance your understanding. Uncover the power of JavaScript and kickstart your programming journey with confidence!

Show more Read less
Institution
Course

Content preview

Javascript Crash Course
Hi guys! After receiving so many requests, here is a crash course on JavaScript.
JavaScript is the most popular programming language in the world and it is easy to
learn. It is used to create interactive and dynamic web pages.

Variables
In JavaScript, variables are used to store data. They can be created using the var,
let, or const keywords.

var: used to declare a variable with function scope or global scope.
let: used to declare a block-scoped variable.
const: used to declare a constant variable.
Data Types
JavaScript has several data types:

Primitive Data Types: number, string, boolean, null, undefined.
Non-primitive Data Types: object.
Operators
JavaScript has several operators:

Arithmetic Operators: +, -, *, /, %.
Assignment Operators: =, +=, -=, *=, /=, %=.
Increment and Decrement Operators: ++, --.
Comparison Operators: ==, ===, !=, !==, <, >, <=, >=.
Logical Operators: &&, ||, !.
Functions
A JavaScript function is a block of code designed to perform a specific task. They
can be created using the function keyword.

function functionName() { // code to be executed}
Function Parameters
Function parameters are used to pass values to a function when it is called. They
are defined when declaring the function.

function functionName(parameter1, parameter2) { // code to be executed}
Statements
JavaScript statements are used to control the flow of execution in a program. They
include if-else statements and loops.

If-Else Statements
If-else statements are used to execute a block of code based on a specific
condition.

if (condition) { // code to be executed if condition is true} else { // code to
be executed if condition is false}
For Loop
A for loop is used to repeatedly execute a block of code for a specific number of
times.

for (initialization; condition; increment/decrement) { // code to be executed}
Demo okay, so 1, 3, 9, 10. Okay, okay. I should bring each and every apple from
this side to the other side. Task, okay, okay, start. Okay, okay, first the count =
1, 2, 3, 4. Okay, less than or equal to 5. Correct, true. Next, next, start + 1.
Certainly false. Okay, okay, counter already 1, second one, third one. Okay, for
count, okay, correct 1, 2, 3, 4, 5. Condition, count = count + step 1. Step 1,
count = 1, count <= 5, 1 <= true, count = count + 1. Step 2, count = 2, count <= 5,
2 <= 5, count or 1, 2, 3. Okay, okay, so again, okay, okay, next. So okay, print
all the numbers from 1 to 10 using a for loop. 1, 2, 3, 4. Count, count, 2, 3, 4.
Okay, okay, so instead count = count. Okay, okay, so next number, reverse number.

Written for

Institution
Course

Document information

Uploaded on
February 19, 2024
Number of pages
3
Written in
2022/2023
Type
Class notes
Professor(s)
Java computer programming
Contains
All classes

Subjects

$9.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sarveshs

Get to know the seller

Seller avatar
sarveshs my own
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions