Home  >  Article  >  Web Front-end  >  days of Miva: Day 7

days of Miva: Day 7

WBOY
WBOYOriginal
2024-08-28 06:04:021059browse

It's day 7 of the 100 days of Miva coding challenge and I continued on my JavaScript learning journey, learning about other types of operators, data types and so much more.
JavaScript Operators
Last time, I begun exploring the different types of JavaScript operators and stopped on the arithmetic operators which allow us to perform various mathematical operations on variables of different data types.

Assignment Operators
Assignment operators are used to assign values to variables in JavaScript. After declaring variables with keywords like let, var,
const, assignment operators are needed to attach values to the variables. There are different types of assignment operators including the simple assignment operator (=), addition assignment operator (+=), subtraction assignment operator (-=), multiplication assignment operator (=), division assignment operator (/=), exponentiation assignment operator (*=) and so on.
 days of Miva: Day 7

 days of Miva: Day 7

JavaScript Data Types
Values assigned to variables can be of different types from numbers to texts to conditional statements. JavaScript has various data types like strings for texts, numbers for integers and decimals(float), Boolean for true or false values and lots more.
 days of Miva: Day 7

Arrays and Objects
Arrays are used to declare multiple values in one variable. It is written in square brackets and the values are separated by commas. Arrays also allow for different data types to be declared inside one single variable.
Arrays are zero-indexed, meaning values in array are counted from zero upwards.

Objects are used to encompass multiple variables into one single line or block of code. They are written in curly braces and unlike arrays, have the variable names paired with their respective values before being separated by a comma. Objects are also zero-indexed and count their values form zero upwards.

 days of Miva: Day 7

More Data Types will be explored on day 8 and also so much more on this exciting JavaScript journey!

https://github.com/Abdul-Samod/100daysofMiva

The above is the detailed content of days of Miva: Day 7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn