INTRODUCTION TO JAVASCRIPT
Javascript is a versatile programming language commonly used for web development. It enables interactive and dynamic content on websites, handling actions like user input, updating page content, and communicating with servers.
In JavaScript, var
, let
and const
are used to declare variables.
var
was traditionally used for variable declaration but has some scope-related issues. it's globally or function-scoped, not block-scoped.let
was introduced in ES6 and is blocked-scoped, making it preferable overvar
in many cases. It allows for reassignment, but not redeclaration.const
is also introduced in ES6 and is block-scoped like let, but it cannot be reassigned once a value is assigned.
Javascript Strings: strings are a sequence of characters created with single or double quotes, concatenated with a +
and has methods of manipulation such as length
Numbers: Numbers can be integers or floating point values and it supports arithmetic operations (+,-,*,/) and more complex mathematical operations. it has special characters like NaN
(Not a Number) and infinity
.
JAVASCRIPT ASSIGNMENTS
- Datatypes Practice questions
- Conditional Practice questions