in JavaScript by
Q:
Is javascript a statically typed or a dynamically typed language?

1 Answer

0 votes
by

JavaScript is a dynamically typed language. In a dynamically typed language, the type of a variable is checked during run-time in contrast to statically typed language, where the type of a variable is checked during compile-time.

Since javascript is a loosely(dynamically) typed language, variables in JS are not associated with any type. A variable can hold the value of any data type.

For example, a variable which is assigned a number type can be converted to a string type:

var a = 23;

var a = "Hello World!";

Click here to read more about JavaScript
Click here to read more about Insurance

Related questions

0 votes
asked Feb 6, 2020 in JavaScript by rajeshsharma
0 votes
asked Oct 19, 2019 in JavaScript by SakshiSharma
0 votes
asked Jan 27, 2020 in JavaScript by AdilsonLima
0 votes
asked Dec 3, 2019 in JavaScript by rajeshsharma
0 votes
asked Dec 11, 2020 in JavaScript by SakshiSharma
...