When I realized not all countries get paid on Medium, I had to make my research and follow few steps (listed in this article). It works my friend! 😊
Bloggers need to be compensated for writing articles because I know how stressful it is.
Medium pays trending stories through Stripe but not all countries support certain features.
React happens to be the most popular JavaScript framework sourced from Stack Overflow Developer Survey (2020). It is the best alternative to two other popular JavaScript frameworks, Angular and Vue. They all allow you to create fast apps in the browser.
According to the official React website:
React is a JavaScript library for building user interfaces
In the definition above, the term user interface is also called a component to React.
A template-like component can be created for reuse in a single web app. It totally adheres to the Don’t Repeat Yourself (DRY) principle.
You only have to change the…
This article is sponsored by Hostgator — Get Started today for $0.99
The alert function accepts a single argument. It displays the result on a modal dialog window.
The word modal means a user can’t interact with the rest of the page.
The modal dialog window is a small box displayed on a web page.
Syntax:
alert(arg);alert('Hello World!');
The prompt function accepts two arguments.
Syntax:
prompt(arg1[, arg2]);
On Internet Explorer, arg2
is required.
// For other browsers
const birthYear = prompt("What year were you born?", 2021);
alert(birthYear);// For Internet Explorer const yourName…
This article is pending… It Will be republished on the 01/21/2021
Techstack article is sponsored by Hostgator.
To declare a variable in JavaScript either var
, let
or const
is used.
Let’s see the differences between the three below.
A Block scope contains a group of code within curly braces {}
.
A variable created with the let
keyword in a block scope is only available within it.
let greeting = "Hi John!!!"; // Global Variableif (true) {
let greeting = "Hello Bello!!!"; // Local Variable
console.log(greeting);// Hello Bello!!!
}
console.log(greeting) // "Hi John!!!"
let
creates either a global or a local variable. …
This article is sponsored by Hostgator — Get Started today for $0.99.
Brendan Eich knew it would be impossible to create a programming language without mistakes in 10 days, so he created a multi-paradigm type of language, JavaScript.
Multi-paradigm is a term in computer programming that allows different styles of programming by developers. That is the ability to structure code in different ways.
The Multi-paradigm approach made JavaScript flexible and versatile. In fact, JavaScript at first was not created to last long, it was created to support Java to improve the users’ experience on the web.
Overtime, JavaScript began to…
Statements generally are instructions to be executed by a computer program.
A JavaScript Program or code is a list of programming statements
Statements in computer programming are executed from top to bottom (and left to right) in the order they appear.
console.log('Hello World!')
When there is more than one statement in a JavaScript program, it is recommended to end statements with a semi-colon.
console.log('Good Day!');
console.log('Happy Coding!');
Although without ending each statement with a semi-colon, computer programs will most likely execute successfully.
console.log('Good Day!')
console.log('Happy Coding!')
There are a few cases when ending statements without semi-colon can lead to errors.
…
JavaScript can display data in different ways using:
As shown in the previous article, you can debug unexpected results from the browser in the console.
index.html
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Using log Object</title>
</head><body> <script>
console.log('Hello World!')
</script>
</body></html>
index.html
The alert()
object is used to display data on the window browser. It displays the result in a modal dialog box.
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=, initial-scale=">
<title>Using alert object</title>
</head><body> <script>
alert('Hello World!')
</script>
</body></html>
Errors in the browser are not visible to developers. But there’s one specific tool that developers use to debug Javascript errors called the console.
To open a ready-made developer environment or console, use either of the following keyboard short cut.
Ctrl
+ Shift
+ I
(Chrome and Firefox)F12
(Chrome and Firefox)Ctrl
+ Shift
+ J
for (Chrome)Cmd
+ Opt
+ J
for Mac (Chrome)Ctrl
+ Shift
+ K
(Firefox)Cmd
+ Opt
+ K
for Mac (Firefox)Cmd
+ Opt
+ C
(Safari)To insert multiple lines on the console, press
Shift
+Enter
. And clickEnter
to execute the code.
Happy Coding!!!
Hi, I am Bello Osagie, a web developer. I teach web development for free… so join me and have fun learning. Let’s code together!!! 😎