D13009K NPN Transistor Datasheet, Pinout, Power Ratings & Applications
Hello Folks! I welcome you on board. Happy to see you around. In this post today, I’ll walk you through the Introduction to D13009K.
D13009K is a high voltage fast switching power transistor that falls under the category of NPN transistors. The collector current of this device is 12A which projects it can endure load under 12A. This chip is mainly used in amplification and switching applications. The small current change at one pair of terminals is used to produce a large current change across the remaining terminals. The power dissipation is 100W which features the amount of power this chip dissipates during the working of this integrated chip.
I recommend you check out this post all the way through as I’ll demonstrate the complete Introduction to D13009K covering datasheet, pinout, power ratings, applications, and physical dimensions.
Let’s get started.
Introduction to D13009K
- D13009K is an NPN bipolar junction transistor that is a high voltage fast switching power device. It is widely employed for switching and amplification purposes.
- This component contains three terminals named base, collector, and emitter. It generates a large current across emitter and collector terminals by changing a small current at the base side. This phenomenon is used for amplification purposes.
- The emitter-base voltage is 9V which details that it requires 9V to start the transistor action and bias this device.
- D13009K contains three layers. Two are n-doped layers and one is a p-doped layer. The p-doped layer sits between the two n-doped layers.
- Bipolar junction transistors are divided into two main types i.e. PNP transistors and NPN transistors.
- The D13009K is an NPN transistor where electrons are the major charge carriers. It is important to note that these devices are called bipolar devices because both holes and electrons are responsible for the conductivity inside the transistor.
- In NPN devices, electrons are the major charge carriers and in PNP devices, holes are the major carriers. Moreover, NPN transistors are preferred over PNP transistors since the mobility of electrons is faster and efficient than the mobility of holes.
- This bipolar junction transistor is a current-controlled device as opposed to MOSFETs that are voltage-controlled devices and carry pins like a drain, source, and gate. The drain side replaces the emitter, the source replaces the collector and the gate replaces the base pin in bipolar junction transistors.
D13009K Datasheet
Before you embed this chip into your electrical project, it’s wise to check out the datasheet of the device that features the main characteristics of the device. Download the datasheet of D13009K by clicking the link below.
D13009K Pinout
This power transistor contains three terminals named:
- Base
- Collector
- Emitter
The following figure shows the pinout diagram of D13009K.
The doping concentration of all these terminals is different. The collector pin is lightly doped while the emitter pin is highly doped. The base pin is 10-times more doped than the collector side.
D13009K Working Principle
- This device comes with high breakdown voltage and carries high current capability. It is a highly reliable product and features a high switching speed.
- The working of this device starts from the base pin. When you apply voltage at the base terminals, it will bias the device and start the transistor action. And current starts flowing from collector to emitter terminal.
- In NPN transistors current flows from collector to emitter terminal and in PNP transistors current flows from emitter to collector terminal.
- These bipolar devices are not symmetrical. This means if you try to exchange the collector and emitter side, it will prevent the terminals to work in forward active mode and force the terminals to work in reverse active mode.
- The different doping concentration of these devices is responsible for the lack of symmetry in these transistors.
D13009K Power Ratings
The following table features the absolute maximum ratings of D13009K.
| Absolute Maximum Ratings of D13009K |
| Pin No. |
Pin Description |
Pin Name |
| 1 |
Collector-emitter voltage |
400V |
| 2 |
Collector-base voltage |
700V |
| 3 |
Base-emitter voltage |
9V |
| 4 |
Collector current |
12A |
| 5 |
Power dissipation |
100W |
| 6 |
Base current |
6A |
| 7 |
Operating and storage junction
temperature range |
-55 to 150C |
- When you’re working with the component, make sure the ratings don’t exceed the absolute maximum ratings. Otherwise, it can affect the entire project.
- The collector-emitter and collector-base voltages are 400V and 700 respectively. And total power dissipation is 100W which shows the amount of power released during the working of this chip. The junction temperature and storage temperature ranges from -55 to 150C.
- Plus, don’t apply these ratings more than the required time, else they can affect device reliability.
D13009K Applications
D13009K is used in the following applications.
- Used in energy-saving lights.
- Used in Bistable and Astable multivibrators circuit.
- Used in high-frequency power transform.
- Employed to support loads under 12A.
- Used in voltage regulator circuits.
- Used in a common power amplifier.
- Incorporated in modern electronic circuits.
- Used in electronic Ballasts.
- Used in the high switching power supply.
D13009K Physical Dimensions
The image below shows the physical dimensions of D13009K.
By reading those dimensions you can evaluate the space required for your component in the electrical project.
That’s all for today. Thank you for reading this entire post. You are most welcome to share your valuable feedback and suggestions around the content we share so we keep producing quality content based on your exact needs and requirements. You can approach me in the section below if you need any help regarding this article, I’m happy and willing to help you the best way I can. Thank you for reading this article.
MJE13007 NPN Transistor Datasheet, Pinout, Features & Applications
Hello Everyone! Happy to see you around. Thank you for clicking this read. In this post today, I’ll document the Introduction to MJE13007.
MJE13007 is an NPN bipolar junction transistor that is a semiconductor device made of silicon material. This chip is mainly used for amplification and switching purposes. The collector-base voltage is 700V while the collector-emitter voltage is 400V. The power dissipation at temp 25C is 80W. This means 80W is released during the working of this device. This device can support load up to 8A because the current at the collector side is 8A.
I suggest you read this entire post till the end as I’ll include the complete Introduction to MJE13007 covering datasheet, pinout, working principle, power ratings, applications, and physical dimensions.
Let’s get started.
Introduction to MJE13007
- MJE13007 is an NPN bipolar junction transistor mainly used for high voltage high-speed switching applications.
- Three layers are used for the construction of this device. One is a p-doped layer that stands between two n-doped layers.
- MJE13007 includes three terminals named base, collector, and emitter. The small input current at the base side is used to generate a large output current across the emitter and collector terminals.
- The emitter-base voltage is 9V which means this device requires 9V to initiate the transistor action.
- Bipolar junction transistors come in two types i.e. NPN transistors and PNP transistors. This device MJE13007 falls under the category of NPN transistors where electrons are the major carriers while in the case of PNP transistors holes are the major carriers.
- It is important to note that in bipolar junction transistors both electrons and holes are involved in the conductivity inside the transistors but holes are majority carriers in PNP transistors while electrons are major carriers in NPN transistors.
- The mobility of holes is less efficient than the mobility of electrons, making NPN transistors a better choice for the range of applications.
- Moreover, the current flows from emitter to collector in PNP transistors while it flows from collector to emitter in NPN transistors.
- Transistors are mainly divided into two main types’ i.e. bipolar junction transistors and MOSFETs. The bipolar junction transistor are the current-controlled device while MOSFETs are the voltage-controlled devices that include terminals known as a drain, source, and gate.
MJE13007 Datasheet
Before you apply this device to your electrical project, it is wise to scan through the datasheet of the device that details the main characteristics of the device. Click the link below to download the datasheet of MJE13007.
MJE13007 Pinout
The MJE13007 includes three terminals named:
- Base
- Collector
- Emitter
The following image represents the pinout diagram of MJE13007.
The small current at the base side is used to control the large current at the remaining terminals. All these terminals are used for the external connection with the electronic circuit.
While the collector side is lightly doped. The base side is 10-times more doped than the collector side.
MJE13007 Working Principle
- The base side is responsible for the overall transistor action. When voltage is applied at the base pin, it gets biased, and current will start flowing from the collector to the emitter terminal.
- This device MJE13007 is not a symmetrical device. The lack of symmetry is due to the difference in the doping concentration of all three terminals.
- If you try to exchange the emitter and collector terminals, it will prevent the device from working in forward active mode and as a result, both terminals will start working in reverse active mode, influencing the values of both common-emitter current gain and common-base current gain.
MJE13007 Power Ratings
The following table shows the absolute maximum ratings of MJE13007.
| Absolute Maximum Ratings of MJE13007 |
| Pin No. |
Pin Description |
Pin Name |
| 1 |
Collector-emitter voltage |
400V |
| 2 |
Collector-base voltage |
700V |
| 3 |
Base-emitter voltage |
9V |
| 4 |
Collector current |
8A |
| 5 |
Power dissipation |
80W |
| 6 |
Base current |
4A |
| 7 |
Operating and storage junction
temperature range |
-55 to 150C |
- The power dissipation is 80W which is the amount of power that will dissipate during the working of this device. The collector-base voltage is 700V and the collector-emitter voltage is 400V.
- The emitter-base voltage is 9V which is the amount of voltage that you will apply to bias the device and start the transistor action.
- When you’re working with this chip, make sure the ratings don’t exceed the absolute maximum ratings. Otherwise, they can severely damage the device, thus the entire project.
- Moreover, don’t apply these ratings more than the desired time, else they can affect device reliability.
MJE13007 Applications
The following are the main applications of the MJE13007 NPN transistor.
- Incorporated in modern electronic circuits.
- Employed in the switched-mode power supply.
- Employed to support loads under 8A.
- Installed in the motor control circuit.
- Used in voltage regulator circuits.
- Used for switching and amplification purpose.
- Used in H-bridge circuits.
- Used in Bistable and Astable multivibrators circuit.
MJE13007 Physical Dimensions
The following figure presents the physical dimensions of MJE13007.
By reading the physical dimensions you can get a hold of the space required to install this device into the relevant project.
That’s all for today. Hope you find this article helpful. You are most welcome to share your feedback and suggestions around the content we share so we keep coming back with quality content tailored to your exact needs and requirements. You can approach me in the section below, for any query regarding this article. I’m happy and willing to help you the best way I can. Thank you for reading the article.
Mathematical Operators In JavaScript
Hello everyone, I hope you are fine. In today's tutorial, we are gonna take a look at “Mathematical operators in JavaScript” in detail. Performing math operator in different programing language is very common. JavaScript also allows several operators to help us in numbers.
The mathematical operator in JavaScript is used for performing certain different tasks such as the final price of a financial transaction, browser windows size and calculating the range between the element in a website document.
There are two types of operator that I am going to discuss in this tutorial.
- Arithmetic operator
- Assignment operator
Arithmetic Operators in JavaScript
To perform an action between two variable or values we use mathematical operators. In the equation 3+2 = 5 (+ is a syntax).
Java script has many different operators some are basic math operator and others are additionals operators particular to programming.
A table of JavaScript Operators
| Operator |
Description |
Example |
Definition |
| + |
Addition |
2 + 3 |
Sum of 2 and 3 |
| - |
Subtraction |
9 - 2 |
Difference of 9 and 2 |
| * |
Multiplication |
3 * 2 |
Product of 3 and 2 |
| / |
Division |
10 / 5 |
Division of 10 and 5 |
| % |
Modulo |
9 % 2 |
Remainder of 9 and 2 |
| ** |
Exponentiation |
9 ** 3 |
9 to the 3 power |
| ++ |
Increment |
9++ |
9 plus one |
| -- |
Decrement |
9-- |
9 minus one |
Let me explain to you all of these operators in detail.
Addition and Subtraction in JavaScript
Addition and subtractions are the operators from basic maths. They are used to find the sum and difference of two numerical values. JavsScript has its own built-in calculator. All these mathematical operators can be directly performed in the console.
As you have seen a simple example of addition and now I am going to explain it with detail. Now I will assign numerical values to a and b and place the sum in c.
- Assign the value to a and b
- Suppose: a = 3; b = 4;
- Now add a + b and assign the sum of a+b to c
- c = a + b; alert(c);
Output
In a similar way, subtraction(-) also work with the same formula but will subtract the number.
- Assign the value to a and b
- Suppose: a = 6; b = 3;
- Now subtract a - b and assign the diffrence of a-b to c
- c = a - b; alert(c);
Output
We can also do add and subtraction by the float (decimals) and negative numbers. Look below with an example.
- a = -6.3; b = 3.5;
- Now subtract a - b and assign the difference of a-b to c
- c = a - b; alert(c);
Output
There is one another fact about the (+)operator that you should know that adding a numeric number and string. As we all know that 1 + 2 return the value of 3. But this will have an unexpected result.
- Suppose c = 1 + “2”;
- alert(c)
Output:
The result of this will be 12 because of the one string value(“2”), javascript concatenate (Concat() function is used to join two or more string together) it rather than adding 1 and 2. So it is really important to be careful because while coding in JavaScript. Therefore JavaScript is case sensitive language.
Multiplication in JavaScript
Multiplication (*) and division (/) are also used in Javascript to find the numeric values by division or multiplication. Multiplication could be used many times like calculating the price of any item etc and division help you in finding the time like the number of hours or minutes.
- Suppose x = 10; y = 5;
- z = x * y;
- alert(z);
Output
Divison Operator in JavaScript
- suppose x = 100; y=10;
- z = x / y;
- alert(z);
Output
Modulus in JavaScript
Modulo (%) is used to find the remainder of a quotient after division. It can help us find in that even if the number is even or odd. It is less familiar operator than others. It is also known as
Modulus too.
- Let suppose x = 11; y = 5;
- z = x % y;
- alert(z);
Output
Exponentiation in JavaScript
Exponentiation (**) is the new operator in JavaScript. Its calculate the power of a number by its exponent. Its written like this 8^4 (Eight to the 4 power).
- x = 8; y = 4;
- z = 8 ** 4;
- alert(z);
Output
8 ** 4 represents the same as 8 multiplied by 8 four times:
8 * 8 * 8 * 8
Increment and Decrement in JavaScript
The
increment operator (++) increase the numerical value of a variable by one and on the other side
decrement operator (--) decrease the numerical value of a variable by one. They are often used with loops.
You can use these operators with variable only and using them with raw numbers can only result in an error. Look in the example.
Increment and Decrement are further divided into two classes:
prefix operation and
postfix operation. Firstly, prefix operator.
let x = 8;
prefix = ++x;
alert(prefix);
Output
Postfix Operator in JavaScript
let x = 8;
postfix = x++;
alert(postfix);
Output
The value of x is not increased in this postfix operator, The value of the x will not be increased until after the expression has been evaluated. But running the operation twice will increase the value.
As you can see in the image that I have increased the value of x.
Now see the
output.
All these increment and decrement operators are used in
for loops most of the time.
Assignment Operators in JavaScript
The assignment operator
(=) is the most used operator, which we have used already. We used the assignment operator to assign the value to the variable.
//Assign 50$ to price variable
Price = 50$
JavaScript also contains
compound assignment operators. Let's discuss a compound assignment operator example.
//Assign 50$ to price variable
Price = 50$
Price += 5$;
alert(price);
The output of this result will be
55$. In this case, price += 5$ is same as price = price + 5$.
The arithmetic operator can be combined with the assignment operator to make a
compound assignment operator. Down below is a table of the assignment operator.
| Description |
Operator |
| Assignment |
= |
| Addition assignment |
+= |
| Subtraction assignment |
-= |
| Multiplication assignment |
*= |
| Division assignment |
/= |
| Exponentiation assignment |
**= |
| Remainder assignment |
%= |
In this article, we have discussed the arithmetic operator and their syntax in detail. If you have a question regarding this post you can ask me. I will reply to all of your queries.
Lastly, thank you for reading this article, and we are working hard to deliver you best content.
While Loop In JavaScript
Hello friends, I hope you all are feeling great today. In today’s tutorial, we will have a look at a detailed “While Loop In JavaScript” topic. It’s our 8th tutorial in JavaScript Series.
Loops are used in programming and they offer the easiest and quickest way to do a repetitive task. In this article, we will learn about While and do..while statements as they are the most basic type of Loops.
For example, if we want to display the same line “I am learning JavsScript” 10 times. Then this can be done with the help of loops easily rather than typing long code. It will save your time and energy.
While Loop in JavaScript
In JavaScript, while loops loop through a block of code until the specified condition is true. The condition is evaluated before executing the statement.
The syntax of the while loop is very similar to if statement.
Syntax
while (condition) {
// execute this code as long as the condition is true
}
In the following example, we have to take a variable i = 1, and the while condition is that when it executes it should be less than 5. For each iteration of the loop, we will add one number.
Output
When we will run the above example, we will receive the following result.
Infinite Loop using While in JavaScript
You might have already the idea what Infinite loop is because of its name. An infinite loop is a loop that will keep running forever. If you make an infinite loop by accident it can crash your browser. So it is really important the awareness of infinite loop otherwise can crash your computer or browser.
Look at the example of the infinite loop.
// Start a infinite loop
while (true) {
// execute code forever
}
Do While Loop in JavaScript
We have learned upside about while loop. The while loop will run a block of code until the specified condition is true.
Do..while statement is slightly different from
while statement, it evaluates the condition at the end of each loop irritation. And do...while condition always executes once even if the condition is never true.
Syntax
do {
// execute code
} while (condition);
I am going to show you the same example with do..while loop so you can understand the difference between them.
Output
In the following example javascript, we have started variable with i = 1. Now it will print the output and increase the value of the variable
i by 1. When the condition will be evaluated loop will continue to run until the variable i is less than 5 or equal to 5.
In this tutorial, we have learned about while loop and do-while loop and the difference between them. We also discussed the infinite loop and how it can you save yourself from crashing your browser.
This is the last tutorial of loop and if you want to learn more about loops like
for...loop, for..in loop and
for..of loop then go visit
for loop in JavaScript.
That's it for today, for more content like this that add value to your life. Keep visiting our website. Comment below if you want to ask anything.
For Loop In JavaScript
Hello folks, I hope you are doing great in your life. In today’s tutorial, I am going to talk about “For Loop In JavaScript”. This is our 7th tutorial of the JavaScript series.
Loops are designed in JavaScript to automate the repetition task. You may have encountered a lot of time in programming that you have to repeat an action again and again. To help you in reducing the number of lines code and time, loops were created.
There are five types of loops JavaScript have:
- For Loop
- For...In Loop
- For...of Loop
- While Loop
- Do While Loop
For Loop in JavaScript
For Loop will run the same code of block again and again repeatedly, for a specific number of time or as long as a certain condition is met.
The For loop of JavaScript is similar to C language and Java for Loop.
Syntax
for (initialization; condition; final expression) {
// code to be executed
}
The for loop is the most concise part of looping. There is three expression use in for Loop initialization, condition, and final expression.
For Loop Syntax in JavaScript
- The first step is initialization where you have to assign a value to a variable and that variable will be used inside the loop. The initial statement is executed before the loop begin.
- The test condition or statement will evaluate that if it is true or false. And if it would be true then the loop statement executes or otherwise, the execution of the loops ends.
- The final expression is the iteration statement where you can increase or decrease your statement.
Let me show you a simple example of for loop.
As you can see in the image that firstly, we
initialize the
for loop with let
i = 0;. Its means that the loop begins with 0.
Afterwards, we declared the condition to be
i < 4; means that the loop will continue to run as long as i is less than 3. Our last expression is
i++, it will increase by 1 each time the loops runs.
Output
Optional Expressions in Javascript For Loop
All of these three expressions in
for loop are optional. we can write the
for statements without initializations. Look at the demonstration for more clarity.
// declare variables outside the loop
var i = 5;
for( ; i<10; i++;) {
document.write("<p> 'The number is + i +' </p>")
}
Output
- The number is 5
- The number is 6
- The number is 7
- The number is 8
- The number is 9
As you can see that it is necessary to put a semicolon
; whether it is empty. We can also remove the condition from the room. For this, we can use
if statement combined with a break. This break is for the loop to stop running once
i is greater than 10.
// declare variables outside the loop
var i = 5;
for( ; ; i++;) {
if(i < 10) {
break
}
document.write("<p> 'The number is + i +' </p>")
}
Output
The number is 5
The number is 6
The number is 7
The number is 8
The number is 9
Never forget to add the
break statement. Unless the loop will run forever and potentially break the browser.
// Declare variable outside the loop
let i = 0;
// leave out all statements for ( ; ; ) {
if (i > 3) {
break;
}
document.write(i); i++; }
Output
The number is 5
The number is 6
The number is 7
The number is 8
The number is 9
For...In Loop
Syntax
for (variableName in Object)
{
statement
}
For...in loop is created to help us in providing a simpler way to iterate through the properties of an object. When you will learn about
objects, then
for..in loop will be more clear to you. Let me explain it to you with a simple example.
Output
For..of Loops
The for...of statement creates a loop for iterate over iterable objects like arrays and strings. It is the new feature of ECMAScript (or ES), ECMAScript 6.
Syntax
for (variable of object)
statement
In the following example, we will create a
for...of loop.
Output
In this article, we learn about What are loops and how to construct the
For Loops In JavaScript and about
for...of and
for...in statement. We will discuss while loop and do while loop in our next tutorial. I hope you have found this article informative and learn something new from it. For more tutorial of JavaScript please keep visiting our website.
If you have any question related to this tutorial, you can ask in comments and you can suggest any changes you want in the upcoming article. We love to hear your suggestion.
Switch Statement in JavaScript
Hello friends, I hope you all are doing great. In today’s tutorial, we will have a look at the detailed “Switch Statement in JavaScript”. It’s our 6th tutorial in JavaScript Series.
As we have learned about the conditional statement and its types (if, if..else, If...else if) in the last article, a conditional statement is the most useful and common feature in the programming language.
Switch is also a type of conditional statement and it will evaluate an expression against multiple possible cases and run one or more blocks of codes base on matching cases. The switched statement work almost as if...else if statement containing many blocks, and it does work so more efficiently than repeated if...else if statements.
Switch Statement in JavaScript
The switch statement is used to perform different action based on multiple cases.
How does switch statement work?
- Firstly, evaluate the expression once.
- Value of expression will be compared with each case.
- If there would be a match, the associated block of code will execute.
Syntax
switch (expression) {
case x:
// case x code block (statement x)
break;
case y:
// case y code block (statement y)
break;
default:
// execute default code block (statement default)
}
Break Keyword in JavaScript Switch Statement
As the name says break, When JavaScript reaches the break keyword, it breaks out of the switch block. It will only stop the execution of inside the block. It will continue until reaching the last break case. Eventually, reach the last case and the break keyword will end the switch block.
Default Keyword in JavaScript Switch Statement
If there is no case match then the default code block will run. There could be only one default keyword in the switch statement. The default keyword is optional, but it is recommended that you use it.
Let’s see an example of a switch statement.
Firstly, the expression will be evaluated.
The first case, 3 will be tested against the expression. The code will not execute because it does not match the expression and it will be skipped.
Then case 4 will be tested against the expression. Since 4 matches the expression, the code will execute and exit out of the switch block.
And your output will be displayed like this.
Output
Let’s make another example of a working switch. In this example, we will find the current day of the week with the new Date()method and getDay()to print a number equivalent to the current day. 0 stand for Sunday, 1 stand for Monday and then throughout till Saturday with number 6.
OutPut
This code was tested on Monday that’s why it is displaying Monday. But your output would be change depending on the day you are testing. I have added default too in case of any error.
Multiple Cases in JavaScript Switch Statement
There is a chance that you may face a code in which you have to display the same output for multiple cases.
So, we have made an example for you to understand these multiple cases.
In this example first, the new Date() method will find a number compared to the current month and then apply the month variable.
Output
In today tutorial, we review about the switch, and how it is similar to if..else if statement. We reviewed the switch statement with three different examples.
To learn more about JavaScript you can read these article series from the start. I am sure these will help you and if you have any question regarding this article. You can comment down below and ask anything.
Thank you so much for reading this article and we are doing our best to deliver you our best. Please visit again. See you in the next tutorial.
If Else Statement in JavaScript
Hello everyone, I hope you are having a fine day. In today’s tutorial, I am going to discuss the if-else statement in JavaScript and what are
conditional statements in detail.
In programming, while writing a program there may be an occasion where you need to adopt one out of a given set of paths. In such a case, you need to use conditional statements that allow your program to make the correct decision.
Conditional statements
Conditional statements are used to run a specific action based on the result of the different conditions (true or false). If the condition would be true one action would be performed and if the condition is false then another action would be performed.
A few examples of JavaScript conditional statements:
- Verify the location of the user and display the language based on the country
- Send a form on submit, display a missing required field warning next in the missing field.
- Show a booking form for a bus ticket but not if the bus is booked.
We have the following conditions in JavaScripts.
- if statement
- if...else statement
- if...else if statement
If Statement in Javascript
If statement plays a very important role in JavaScript to make decisions. It will decide whether the statement is true or false and only run if the statement is true. Otherwise, the code block will be ignored if the statement is false.
Syntax
if (condition) {
// block of code that will excute if the condition is true
}
Note: if is a lowercase letter and If or IF will cause a JavaScript error.
A simple example to see how if statement work in javascript.
Let’s suppose you are going to pay your electricity bill through an app where you have a certain amount of money already in your account.
Your account money is 5000 and you have to pay the electricity bill of 700. Using the <= help you in finding that whether you have less than or equal to electricity bill money available to pay it. Since the Electricity_bill <= money evaluates to true. The code will run because the condition is true.
output
See another example, in case you have less money than your Electricity_bill.
This example does not have any output because of Electricity_bill <= money evaluated to false. Now the code block will be ignored and the programme will continue on the next line. And there will be nothing in output.
If Else Statement in JavaScript
In if statement code only proceeds when the condition is true but in the if-else statement whether the condition evaluates true or false it will execute.
Syntax
if (condition){
// block of code that will execute if the condition is true
} else {
block of code that will execute if the condition is false
}
As an example, to find out an even or odd number.
Output
Since the condition of if is not true then code moves to the else statement and execute it.
if-else condition is more common than only if condition. It can help users in giving warning and letting them know what decision they should make.
IF Else If Statment in JavaScript
If you want to check more than two conditions than you can use
if...else if statement.
With
if...
else statement, you can find out that if the condition is true or false. However, sometimes we have multiple possible conditions and outputs and needed more than two options. For that purpose, we can use if...else if statement.
Syntax
if(condition a) {
// block of code that will execute if condition a is true
} else if (condition b) {
// block of code that will execute if condition b is true
} else if (condition c) {
// block of code code that will execute if condition c is true
} else {
// block code that will execute if all above conditions are false }
There is no limit for
else if statement, you can add as many as you want but there is a
switch statement that would be preferred for readability.
Let's see a simple example of checking grade of students based on numbers out of 100.
Output
This tutorial provided a brief overview of conditional statement, if, if..else and if...else if statement that you can use in JavaScript. To learn more about JavaScript from the first article you can read
Introduction to JavaScript.
Thank you for visiting our website. You have any question regarding this post feel free to comment below and ask any question related to this post. We are looking forward to hearing from you.
Introduction to Bitcoin - A Comprehensive Beginner Guide
Hi folks, I hope you guys are doing great. In my previous post, I have discussed what cryptocurrency is. Before I go in detail about Bitcoin, let me tell you. Go and read the last article about cryptocurrency. As you should have information about cryptocurrency before jumping into bitcoin.
Bitcoin has become a buzz word now. It’s been around 12 years since Bitcoin release. A person or group of people name Satoshi Nakamoto emerge bitcoins that host a digital currency bitcoin.
The individuals who already knew about Bitcoin are curious about it that how is it going to leave an impact on our daily lives in the future. I am here to answer all of your questions and that will clear all your doubts and curiosity.
So we are going to cover all these topics down below:
- What is Bitcoin?
- Understanding of Bitcoin in Depth.
- How Does Bitcoin work?
- What is Mining?
- Useful Definition for Bitcoins wallet.
- How can I store my Bitcoins?
- Types of wallets.
- How to Buy Bitcoins?
- Pros of Bitcoin.
- Cons of Bitcoin.
- Conclusion.
Introduction to Bitcoin
- Bitcoin is the official first cryptocurrency that had been released in 2009. It is basically a digital currency and only exists electronically.
- Bitcoin becomes known in 2009 when the world economy was on the crisis. Those big banks were doing fraud with clients and manipulating the system.
- So, basically Bitcoin founder actually wants to get rid of the third party and put the seller in charge. They want to make transaction safe and secure without any interest fees and corruption.
- Bitcoin is a decentralized system, it means it doesn’t have any central hub or any insinuation like banks etc that controls the amount of Bitcoin.
- Bitcoin has come too far in such a short time. Now globally different big companies are accepting Bitcoin as currency.
Understanding of Bitcoin in Depth
Bitcoin has a different importance for different persons.
The Bitcoin process is organized and easy to understand. Bitcoin uses peer to peer technology for the transaction of Bitcoins. All of these transferred are tracked on
“Blockchain” and known as the giant ledger. This giant ledger saves all the transaction of Bitcoin that ever made.
The giant ledger records every transaction and whenever it made.
17 million bitcoins are currently in circulation. No one is yet controlling the supply of bitcoins, that’s means that supply is controlled by design. The total supply of bitcoins that will be ever created is 21 million bitcoins.
How Does Bitcoin work?
Before further getting into details about working of bitcoins, if you are not interested in the technical process then you can check my last article about cryptocurrency where you can find a simple example of bitcoin working.
As I told before, Bitcoin is decentralized and work on a giant ledger also called a blockchain. Bitcoin is a secure process and uses a great verification method which minimizes the risk of hacking and fraud.
Volunteers of bitcoin referred to as”
miners” who constantly update and verify the blockchain as you all know that bitcoin is decentralized.
When a specific amount of bitcoin transactions is verified then another block is added to the blockchain and that’s how the business continues as usual.
May you have heard the term “mining” many times when reading about bitcoins. So I will explain to you briefly today about mining.
Introduction to Mining?
As you all know now that in bitcoin there is no central hub for verifying the transaction of bitcoins. So all the people on the networks are verified each transaction.
The people who are verifying transaction are miners and all of this process will be called Mining. Mining is a process that keeps the bitcoins secure by adding the new transaction or updating it and keeping them in the ledger.
Let me explain the process simpler so you will understand.
Now you must be thinking how could a person sit 24 hours for this single process and verify and update all the procedure. Actually, there is not any human being who is doing this process but hardware are used to perform Bitcoin mining. And these hardware called miners.
Miners are presented with math problems and the first one who will solve this problem will add a new transaction (or block) in the ledger. All of these calculations are stand on
Proof of Work.
There is a reward system involved in the process of Bitcoins. The one miner who will solve first will get a reward. The reward got changes over time with the update of Bitcoin programming.
The most successful process uses in bitcoin is
ASICS–Application-Specific Integrated Circuits. ASICS are hardware systems similar to CPU but these are only designs for bitcoin mining.
All of the mining processes take a lot of power and effort. The competition is higher in this bitcoin mining and that makes it difficult for new people to enter the race and get profit.
Bitcoin wallets
There are different applications you can use to store your bitcoins in the wallet. As you all know already this is a digital currency and you can’t keep it in your pocket. But first, let me introduce you some useful definition before going further in detail.
- Exchange Platform
It is a platform where you can trade money to cryptocurrencies such as Bitcoin, Litecoin or Ethereum. You can also buy and sell one cryptocurrency to others.
- Hard Wallet
It is an offline wallet that is not linked to any network.
- Public Cryptographic Key
The Public Cryptographic Key is like your bank account number. The Public Cryptographic Key is the information you give someone to receive cryptos.
- Private Cryptographic Key
It is key that will allow you to spend your bitcoins or any other cryptocurrency. You can't share it with anyone because if you did they can steal your bitcoins or transfer to their wallets.
- Wallet platform
Wallet platform is like your bank account where all of your cryptocurrencies are kept.
How can I store my Bitcoins?
Now you can understand the bitcoin wallet terms easily. Let’s jump into it with further details.
Bitcoin has secure transaction technique and it is difficult to hack the wallet and if you had ever heard that bitcoin being hacked. It does not mean that someone wallet got hacked but it would be probably the exchange platform.
There are different wallet platforms and are extremely secure that make it impossible to hack.
It is an email server that handles all the aspect of processes without relying on any third party. It allows you to control your whole transaction from beginning to end by yourself. But sadly this is not for beginners.
A hard wallet is like a USB that allows you to store cryptocurrencies key offline. Your cryptocurrency will be only live on your hard wallet and it is not possible to hack unless someone steals your hard wallet.
A web client is opposite to Full client. It totally depends on the third party. The third party will help you to operate your all transaction.
This is an alone email client that helps you in connect to mail server to access all the email. It would store all your bitcoins but it also needs a third party server owned server to access the network and make the transaction.
Types of Bitcoin wallets
Wallet basically comes with five different main types. Each type has its own advantage and disadvantage.
- Desktop
- Mobile
- Web
- Hardware
- Paper
How to Buy Bitcoins
It was difficult to buy bitcoin in the past because of the trouble of finding a trustworthy place to buy bitcoins. But now as the popularity of bitcoins, the demand for bitcoins got increased and many new companies have decided to help in easily purchasing Bitcoins.
Now day’s bitcoins exchanges are receiving huge investments.
Coinbase is a good platform to buy and sell your bitcoins. Its got launched in 2012 and providing users with an easier way to buy bitcoins. It is the easiest ways for newcomers who want to buy bitcoins.
Gemini is another great place to buy bitcoins. It was founded in 2015 by Tyler and Cameron.
Pros of Bitcoin
- Payment can be made to anyone and at any time instantly
- Does not require any third party for the transaction
- Data of Bitcoin can’t be manipulated by any person, bank, or government
- Processing fees of bitcoins are low
- Transaction of Bitcoin can’t be reversed
Cons of Bitcoin
- Bitcoin Exchange hacks
- Mining Scams
- Lack of adoption by business
- The strength of bitcoin lies in its networking effects.
- Transactions are slow and you have to wait almost ten minutes for your network to approve
Conclusion
Everything in this world comes with advantage and disadvantage. Now it is up to you how you will use it in your life.
Bitcoin is free from third party interference and manipulations. It is a transparent system where you are aware that what is happening with your money. Bitcoin is going to grow stronger when most of the people will be aware of its efficiency.
NOW it is time for your respond. What do you think about bitcoins? Comment down below for any further query and suggestions.
Introduction to Ethereum (ETH) - Complete Guide For Beginners
If you want to know what is Etherum, then you are in the right place. I am going to tell you in detail about what Ethereum is, and how does it work. There will be also the pros and cons of Ethereum.
As I discussed in my previous articles about them with complete guide. That bitcoin was created in 2008 by Satoshi Nakamoto. But no one knows who he is and the interesting thing about bitcoin is that it is decentralized and nobody owns it. There is no COE, CMO, CTO, etc. In it. They are all developers who are working from around the world. So, if you don’t know about them, then start off by reading them.
The question that might come up in your mind that what Etherum is and what is the reason behind the existence of Ethereum. Don’t worry, I will explain each and everything in detail down below.
You must be aware of the fact that our data are stored on other peoples' computers. Clouds and servers are owned by Amazon, Google, Facebook, etc. Even this single tiny article is stored on some cloud.
As we all know that our data on the internet is not safe. There are different authorities who can access our data at any time and they can get our personal data, financial and passwords. The hacker and the government can access your data at any time and can modify it. In short word, they can change or leak and steal your data anytime.
People from diverts platforms come outside and said that the internet was meant to be decentralized. That's why blockchain technology emerged to achieve the goal of making the digital world decentralized.
And Ethereum is the newest technology to join this trend.
What is Etherum?
- Etherum is an open software program based on blockchain technology. It allows developers to develop and extend decentralized applications.
Is Etherum is related to Bitcoin?
No, they are not similar much, but kind of similar in different ways. I will discuss them with you in detail.
Similarities
- Ethereum is a public blockchain network like Bitcoin.
Differences
- Their purpose and capability of doing work are different.
- Etherum is focused on running the programming code of any decentralized application, but bitcoin focuses on only one application.
- The bitcoin blockchain is used to trace the ownership of bitcoin. While Etherum focuses on running the program code.
- There are real people who are working behind this cryptocurrency
- It is based on smart contracts
What are smart contracts?
Smart contracts are a digital code well some people call it only code. It is also called “Digital Triggers”. You can implement them online to execute a certain task that you need. Let me explain it with an example.
Virtual vending machine
I put an escrow and add some of certain rules in escrow. Meaning, when certain people will register their five votes into escrow automatically. And then automatically that escrow will open up and send five people this cryptocurrency ether.
vending machine
Or maybe some of you will understand with this simple example.
It is the same as a vending machine where you will put a dollar then press a code and that code will execute a trigger. And that triggers in all spin on a different candy bar for you and you will get the one you pressed code for.
Smart contracts are based on rules and laws. And it is just a computer code that can help you in exchange money, share, content, and property, etc. A smart contract is a self-operating computer program that runs when it meets specific conditions. It runs on the blockchain as they programs without the interpretation of any third party. While blocking programmed have the ability to process code but in very restricted manners.
But Ehterum is totally different, they allow developers to build operations they want. That means a developer can build different applications.
In the Etherum blockchain miner works to earn Ether. Ether is a type of crypto token.
Notes: Okay let me clear you what Ether is and it is the currency that is used to buying services in Etherum. And Ether is a digital currency that is used for trading.
There is also a one more token too, that is used to pay miners fees to include transactions in their block. And it is called Gas.
History of Etherum
Etherum has a controversial and significant history. Etherum was founded by the taluk butyrin and got released in 2015. It is becoming better to know cryptocurrency outside Bitocin. It has a completely different blockchain protocol.
Recognized for sorting all the computer programs. The purpose behind creating Ethereum was to take advantage of the potential provided by blockchain technology.
What Ethereum can be used for?
It allows developers to build and extend decentralized applications. Dapp or Decentralized app serves a different purpose to its users.
For example, bitcoin is a Dapp that provides its users a peer-to-peer digital cash system and that enables a bitcoin online system.
A decentralized application is one that runs on the blockchain network, and it is not controlled by any single person or central hub or entity.
Through Ethereum any service that is centralized can be decentralized, for example, voting system, loan provided, etc.
Etherenum can also build Decentralized Autonomous Organizations (DAO). DAO is fully decentralized without any leader. It runs on programming code and on a collection of the smart contract written on the Etherum Blockchain. It can be own by anyone who buys its token. But instead of each token equalizing to equality shares and ownership. This token acts as contributing and that contribution give different people voting rights.
It is also used as a platform to launch other cryptocurrencies. Lately, Ethreum has created a new standard to track unique digital assets. Different games are developed recently using this technology like overnight hit crypto-kitties.
Advantages of Etherum
Here is the main advantage of Ethereum that will develop your more interest in it.
- A third party can’t change its data
- All the applications, organizations or projects that are running under Etherum cannot be turned off.
- The security in Ethereum is super strong because of the PoW consensus and cryptographic techniques that are used in the transaction model. The central point network is so strong that protects the model from hacking and manipulations.
- Because of Pow consensus censorship is unfeasible.
Disadvantages of Etherum
- There is nothing in this world that does not have any disadvantages. Everything comes with its own advantage and disadvantages and that makes it more attractive and grab peoples' attention.
- Here is the disadvantage of Etherum:
- It is capable of being attacked by hackers. That can be used through the complexity of the basic programming language used in smart contracts, Solidity.
- The Ethereum main focus is on decentralization and security over Scalability.
Ethereum Mining
As you have read in another article about bitcoin mining. It is similar to bitcoin mining, you will know about it more when you read it.
But still, there are few major differences between bitcoin mining and Etherum mining. In Ethereum mining blockchain is not only stored the transaction list of the blockchain but also note down the most recent state of the network.
- Use Patrica Trees rather than Merkel Trees in its blockchain regulations that enable Ethereum to efficiently store.
- The block time is 12 seconds.
- Miner paid for gas expended in blocks.
- The reward of the static block is 3 ETH.
- The Ethash Mining Algorithm (Uses DAG).
- There is an extra reward for including Uncles as blocks.
If you are in a hurry and don’t have much to read all the article. You want to know the answers to the questions. Then read them below, there are few important short questions about Ethereum is available for you.
- What is Etherum? A Blockchain application platform.
- What is Ether? It is the fuel of the Ethereum network.
- How to use Ethereum? By dapps, wallet, and trading.
- Who created Ethereum? Vitalik Buterin.
- How Ether Works? It is work by turning complete programming, EVM and State
- How Etherum Mining Works? It works by “Proof of stake” and “Proof of work”.
- How to Mine Ethereum? By pooling and mining software and GPUs.
- How do Ethereum smart contracts work? It worked with gas, transaction, and fees.
Conclusion
So now you have a clear idea of what is Etherum unless you don’t, then read this conclusion with full concentration. It will help you in understanding different things.
As you all know Ethereum is one of the most popular platforms in cryptocurrency and the blockchain world today. Looks like Ethereum is going to stay for a long time in the decentralized application.
It is helping us in changing the way of the usage of the internet. So let us know if you have any questions related to this article.
I will love to answer all your questions. And tell us what is your favorite cryptocurrency so I will cover that cryptocurrency in my next post.
What Is Ripple (XPR) - Everything You Need To Know
If you have an interest in cryptocurrency then there is no doubt that you have NOT already heard about Ripple (XPR) or What is Ripplee (XPR). Ripple is not just a cryptocurrency, it is also a platform.
Ripple is an open source platform which allows doing cheap and fast transactions.
I have put together this complete beginner guide for you. I am going to discuss everything you need to know about Ripple (XPR).
Ripple is one of the top five cryptocurrencies and on the top of the list is as usual bitcoin and
Ethereum is holding a second position. Ripple is in the third position.
We are going to cover every aspect of ripple for you, so have patience and read it till the end. You are going to learn so many new things about Ripple in this article you may have not heard before.
For deeper information about Ripple keep reading. The topic I am going to cover are:
- what is Ripple (XPR) ?
- What is RippleNet - How does Ripple Work?
- What is the Ripple protocol Consensus algorithm RPCA?
- Uses of the Ripple.
- Banks Support Ripple.
- Benefits Of Ripple.
- Is it safe to invest in Ripple?
- How is it different from Bitcoin?
- Where can you buy XRP?
- Which wallet to save XRP?
- Conclusion
So, you must be thinking what is Ripple (XPR)?
Ripple was founded in 2012 by a San-Francisco Fintech company name Ripple Lab Inc. The aim of this company was to provide instant, secure and affordable transaction platform.
Brad is the CEO of Ripple
Ripple has built upon the
open source an internet protocol. Ripple has an aim to increase the efficiency of the transaction between financial institutions. The word Ripple is most of the time used to refer its digital currency XRP.
But they allow other people to use this platform and create their own RippleNet.
What is RippleNet - How does Ripple Work?
RippleNet is a network that provides payment to different organisations like banks and other money service business. They all use solutions what Ripple has provided them to send money globally with a smooth experience.
Might be you have not understood what actually Ripplenet network does and how it helps individuals. Here is an example for you.
Justin lives in Newyork and has a cookie box he does not need. He is just interested in watching a football match. But he does not have a ticket.
Adam who lives in a California has a rare book which he would like to giveaway for a cookie box.
Annie who lives in Los Angles has a ticket for a football game and has not any interest in a football game. But want to read an interesting or a rare book.
We are living in a system where we don’t have sources to find each other and make our not valuable things valuable.
But in the Ripple platform, you could by saying “Hey, I have a cookie box but I want a football game ticket”. Then Ripple network will look for a shortest and efficient way to make it happen.
Besides it, it allows making payment in any currency including bitcoin. The minimal transactional fee is $0.00001. It is only because of preventing the system from DDOS attack.
What is the Ripple protocol Consensus algorithm RPCA?
As I told you before that Ripple has a distinctive way of working than Bitcoin and Ethereum. It does not have a blockchain but uses its own technology RPCA to verify transition and make sure everything is ok.
Word ‘Consensus’ means that if every node agrees with the rest then it means there is no issue.
Here is an example: Suppose there is a place where ten wise man lives and a city need all of them agreed on one thing to make a decision. The decision could be anything like about the release of prisoner or rises of tax etc. But if one of them disagree then nothing will happen until we figure out what is his problem.
Pros of Ripple
- Low commission currency exchange
As you all probably aware of the fact that many currencies can’t convert directly with each other. That's why the banks use the US dollar as a medium to convert currencies. Therefore banks take a double commission for converting money.
They will convert A money to US dollar and again US dollar to B money. Ripple also works as mediators but is much cheaper than US dollar.
- Fast Worldwide Transactions
Regardless of cheap commission Ripple is a fast international transaction mediator. The average transaction time of Ripple is 4 second. If we compare it with Bitcoin which takes hours for the transaction and regular banks take days.
It is an interesting fact that a user can create his/her own currency for transaction. For example, an individual can create a currency to buy a football game.
Banks Support for Ripple
- Yes Bank
- Santander
- Axis Bank
- Westpac
- UBS
- Union Credit
- NBAD
Benefits Of Ripple
There are so many benefits of Ripple that can amaze you. Here are a few important ones I am going to highlight in this post.
- More powerful than bitcoin because it is a day to the day payment system. Moreover, it is the fattest and efficient platform in a transaction.
- An official organization started Ripple. So their main goal is to be used by a bank.
- Ripple has an ability to change in any currency including gold etc with a minimal commission.
Is it safe to invest in Ripple?
As I told before in 8 Best Cryptocurrency To Invest In 2019 article that what are the best cryptocurrencies for you to invest in.
As you all know that there is not a single place in this world where investment is 100% safe. There is always risk include in your any decision. Regardless of all the fact following are some advantage and disadvantages for you.
Advantages:
- As I mentioned above that Ripple is the most trusted digital currencies by many banks. Because it is not a company with no name but there is an organization behind it.
- All the tokens have already existed, and there is no doubt of inflation.
- Ripple currency is climbing the currency chart and now is on 3rd position.
- The XRP value will be increased if banks start to use it as their transaction platform.
Disadvantage:
- It is centralized, but the cryptocurrencies are recognised for decentralization. Ripples developer can control its number of releasing or not releasing. It is like a bank.
- There is also on another drawback that ripples lab has owned it 61 percent of coins.
- There are chances of being hacked despite its open source and very smart built.
Difference between Ripple & Bitcoin
The main contrast between Ripple and Bitcoin is that:
- Ripple is centralised but Bitcoin is decentralised.
- Bitcoin is blockchain based technology but Ripple is not.
- Ripple uses HashTree to compile the data.
- The main focus of Ripple is to move money across the world fast.
- Token of Ripple is not mined like Bitcoin or other cryptocurrencies.
Where can you buy XRP?
There are different platforms available where you can buy XRP. You can buy it from these exchanges.
- Binance
- Bittrex
- Bitstamp
- Kraken
- Bitfinex
There are many other different places where you can buy but these are the most popular and trusted one.
Which wallet to save XRP?
When you will buy XRP, you must have to hold them in a wallet safely. I am going to share with you the best wallet for XRP.
The
ledger Nano S is the most used hardware wallet, its support XRP storage. As it is a hardware wallet and it is safer to store your cryptocurrency and easy to use.
I will always recommend using a hardware wallet.
It is another one of the most used wallets,
Toast Wallet is an open source wallet. It is available on Windows, Mac, Linux, IOS and Android. It is a software wallet and I will not recommend you to store a large amount of XRP.
Conclusion
I hope you could understand now What Ripple is and how it's work - It allows almost immediate cross border transaction with cheap cost. Ripple is the 3rd biggest coin by market capitalization.
Moreover, Standing at the same position for a long time is not an easy task but XRP is doing it for a long time. Ripple is reaching their goals by doing all the advancements in the system and adding more banks to their system.
Ripple holds significant financial capital and doing all the effective partnership with big companies. Besides, if XRP got to succeed in gaining Worldwide adoption then the transaction amount will be tiny as compared to current costs.
But nothing is happening like this for now. But we can be hopeful for a change.
What do you think about Ripple and XRP? Are you going to invest in XRP in future or have you invested? Let me know by commenting below and if you have any query feel free to ask.
I am going to cover many other cryptocurrencies topics that you should know except
What is Ripple (XPR) - A complete beginner guide. So keep visiting our Blog or bookmark our website and visit it daily or weekly for the latest cryptocurrency updates.