Javascript 10 Basic Fundamental A re-introduction Concept.
Hello programmers! For today’s post, I’ve decided to do an article summary map of the basic A re-introduction to JavaScript.the basically summarizes the main foundational concepts without you needing to spend hours reading up on everything.
Alternatively, it can be used as a reference guide to quickly get you started. Bite-sized explanations are posted below. Hope you like it!
This post covers some basic A re-introduction to JavaScript.
JavaScript programs manipulate values, and those values all belong to a type. After a long time learning and working with object-oriented programming,
00. Code Structure
A statement is like a sentence — but in code.
For example:
console.log('Hey Sajjad');
01. “String”
Primitive values, like “Sajjad Sadiq”, cannot have properties or methods (because they are not objects).
The String
the object is used to represent and manipulate a sequence of characters. Strings are useful for holding data that can be represented in text form. check their…. length
,indexOf()
,charAt()
,concat()
,includes()
,endsWith()
,substr()
,trimEnd()
,trimStart()
,toUppercase()
,toLowercase()
,slice()
,split()
,replace()
,
var jsStr= "hey! you are a programmer?";
02. “Number”
Arrays are list-like objects, ECMAScript has two built-in numeric types: Number and BigInt. Values of other types can be converted to numbers using the Number()
function.Convert different object values to their numberlike 42
or -12.32
.
Number.isNaN():
Determine whether the passed value is NaN
.
Number.isInteger():
Determine whether the passed value is an integer.
03. “Array”
JavaScript arrays are used to store multiple values in a single variable. An array is a special variable, which can hold more than one value at a time.
Syntax:
var array_name = [item1, item2, ...];
For example:
var language= ["c", "java", "python", "javascript"];
04. “Math”
Math
is a built-in object, Math
works with the Number
type. The JavaScript Math object allows you to perform mathematical tasks on numbers.
Math.abs(saj):
Returns the absolute value of saj
.
Math.ceil(saj):
Returns the smallest integer greater than or equal to saj
.
Math.floor(saj):
Returns the largest integer less than or equal to saj
.