So without further ado, let’s begin.
📺 The video in this post was made by Programming with Mosh
The origin of the article: https://www.youtube.com/watch?v=09BwruU4kiY&list=PLTjRvDozrdlxEIuOBZkMAK5uiqp8rHUax&index=6
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
**length** property returns the length of a string. Take a look at the example below:
The Length method.
You can search for a string inside another string using the search method, It will return the position of that string. Have a look at the example below:
The Search method.
HTML builds the basic structure. This file contains some basic HTML tags like div, h1, title, etc. also we’ve used bootstrap (CDN is already included).
We have used simple HTML tags except
The compound assignment operators consist of a binary operator and the simple assignment operator.
The binary operators, work with two operands. For example a+b where + is the operator and the a, b are operands. Simple assignment operator is used to assign values to a variable(s).
It’s quite common to modify values stored in variables. To make this process a little quicker, we use compound assignment operators.
You can also check my video tutorial compound assignment operators.
Let’s consider an example. Suppose price = 5 and we want to add ten more to it.
var price = 5;
price = price + 10;
We added ten to price. Look at the repetitive price variable. We could easily use a compound += to reduce this. We do this instead.
price += 5;
Awesome. Isn’t it? What’s the value of price now? Practice and comment below. If you don’t know how to practice check these lessons.
Lets bring down the price by 5 again and display it.
We use console.log command to display what is stored in the variable. It is very help for debugging.
Debugging let’s you find errors or bugs in your code. More on this later.
price -= 5;
Lets multiply price and show it.
and finally we will divide it.
If you have any doubts, comment below.