Professional Documents
Culture Documents
JavaScript is the widely used programming language, all over the world.
JavaScript originally called LiveScript at Netscape. JavaScript is a lightweight
language that is open-source and allows cross-platform. It doesn’t require
compilation and is interpreted with object-oriented capabilities. Also, it works
with various other programming languages.
There are various applications of JavaScript, and I can tell few of them.
One application of JavaScript that is really important is the Client side
validation, this is to verify any user input before submitting it to the server
and JavaScript plays an important role in validating those inputs at front-end
itself. Another one application is Manipulating HTML Pages which helps in
adding and deleting any HTML tag very easily using JavaScript and modify
your HTML to change its look and feel based on different devices and
requirements. JavaScript helps in manipulating HTML page on the fly. Next is
User Notifications where you can use JavaScript to raise dynamic pop-ups on
the web-pages to give different types of notifications to your website visitors.
The other one is Back-end Data Loading where JavaScript provides Ajax
library which helps in loading back-end data while you are doing some other
processing. This really gives an amazing experience to your website visitors.
JavaScript needed also in and applicable in Modern Uses like Web, Mobile
and Desktop Applications, for Game Development , Scientific Applications,
Internet of Things (IoT) Devices and so on.
JavaScript programming called a dynamic computer programming
language because everything and all variables are dynamic. All dynamic
means in this context is that the script is performed on the client's computer
rather than on the server. However, dynamic most commonly refers to scripts
that control, access, or manipulate HTML elements on the page which
JavaScript have.
Activity 2.3
Write an essay discussing the programming language Ruby and explain what
makes it called “a programmer’s best friend”?
It provides very high-level dynamic data types and supports dynamic type
checking
What this basically means is that the type of a variable is decided at the
run time and not in advance. Due to the presence of this feature, we do not
need to specify the type of the variable during coding, thus saving time
and increasing efficiency.
It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
Python runs code line by line like C,C++ Java. It makes easy to debug the
code. For example, you can write code in C or C++ and compile with your
python code.
Activity 2.5
Discuss how does Java differ from JavaScript?
Activity 2.6
Choose one of the high-level key objectives as a programming
language of Clojure and explain.
Activity 2.7
Explain why is Haskell called a “lazy language”?
Haskell is a lazy language. This means that the evaluation of expressions is
delayed until their values are actually needed.
Lazy evaluation is a method to evaluate a Haskell program, it means that
expressions are not evaluated when they are bound to variables, but their
evaluation is deferred until their results are needed by other computations.
For lazy evaluation to work, data required for a computation must be
accessible and meaningful at the time of evaluation. This necessitates that all
computational actions must be devoid of side effects, which is a condition
guaranteed by pure functional programming languages like Haskell. Lazy
evaluation is the most heavily used method of executing Haskell programs.
Activity 2.8
Why is Scala called statically typed language?
Scala called statically typed language because Scala is the type of language
where the type of variables is known at the compile time or perform type
checking at compile time. Scala does not expect you to provide redundant type
information. Scala is a statically typed language, so there are always defined
sets of types, and anything that doesn’t fall inside that set is classified as an
invalid type and an appropriate error is thrown at compile time.
The outcome in Scala is much cleaner and well-organized language which
finally easy to use and productive.