Author: admin
-
Decision Making
A conditional/decision-making construct evaluates a condition before the instructions are executed. Conditional constructs in Dart are classified in the following table. Sr.No Statement & Description 1 if statementAn if statement consists of a Boolean expression followed by one or more statements. 2 If…Else StatementAn if can be followed by an optional else block. The else block will execute if the Boolean expression tested by…
-
Loops
At times, certain instructions require repeated execution. Loops are an ideal way to do the same. A loop represents a set of instructions that must be repeated. In a loop’s context, a repetition is termed as an iteration. The following figure illustrates the classification of loops − Let’s start the discussion with Definite Loops. A loop…
-
Operators
An expression is a special kind of statement that evaluates to a value. Every expression is composed of − Consider the following expression – “2 + 3”. In this expression, 2 and 3 are operands and the symbol “+” (plus) is the operator. In this chapter, we will discuss the operators that are available in Dart. Arithmetic Operators…
-
Operators
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. There are a LOT of operators provided by elixir. They are divided in the following categories − Arithmetic Operators The following table shows all the arithmetic operators supported by Elixir language. Assume variable A holds 10 and variable B holds 20, then −…
-
Variables
A variable provides us with named storage that our programs can manipulate. Each variable in Elixir has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. Types of…
-
Variables
A variable is “a named space in the memory” that stores values. In other words, it acts a container for values in a program. Variable names are called identifiers. Following are the naming rules for an identifier − Type Syntax A variable must be declared before it is used. Dart uses the var keyword to…
-
Data Types
For using any language, you need to understand the basic data types the language supports. In this chapter, we will discuss 7 basic data types supported by the elixir language: integers, floats, Booleans, atoms, strings, lists and tuples. Numerical Types Elixir, like any other programming language, supports both integers and floats. If you open your…
-
Data Types
One of the most fundamental characteristics of a programming language is the set of data types it supports. These are the type of values that can be represented and manipulated in a programming language. The Dart language supports the following types− Numbers Numbers in Dart are used to represent numeric literals. The Number Dart come…
-
Node.js Timer
Node.js Timer functions are global functions. You don’t need to use require() function in order to use timer functions. Let’s see the list of timer functions. Set timer functions: Clear timer functions: Node.js Timer setInterval() Example This example will set a time interval of 1000 millisecond and the specified comment will be displayed after every…
-
Basic Syntax
We will start with the customary ‘Hello World’ program. To start the Elixir interactive shell, enter the following command. After the shell starts, use the IO.puts function to “put” the string on the console output. Enter the following in your Elixir shell − In this tutorial, we will use the Elixir script mode where we will keep…