0% found this document useful (0 votes)
5 views1 page

JavaScript Overview and Key Concepts

JavaScript is a programming language for the web that can manipulate HTML and CSS, and was created by Brendan Eich in 1995. It allows for dynamic behavior on web pages through various types of JavaScript, including inline, internal, and external scripts. Key concepts include variables, arrays, and methods for outputting data, making it essential for web development.

Uploaded by

thiraisheditzzz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

JavaScript Overview and Key Concepts

JavaScript is a programming language for the web that can manipulate HTML and CSS, and was created by Brendan Eich in 1995. It allows for dynamic behavior on web pages through various types of JavaScript, including inline, internal, and external scripts. Key concepts include variables, arrays, and methods for outputting data, making it essential for web development.

Uploaded by

thiraisheditzzz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

1)What is javascript:-->

a)Javascript is programming language for web


b)it can update and change both html and css
c)it can calculate, manipulate and update data

d)javascript and java are completely different programming languages both in


concepts and design
e)Javascript was invented by brendan eich in 1995
f)ECMAscript is the official name for javascript
g)ES6 is current version of javascript

2)Why to learn javascript:-->


a)Html:-->to define content of web page
b)CSS:-->to define layout and design of web page
c)Javascript:-->to program the behavior of web page

3)Javascript can change HTML contents:-->

4)type's js:-->
a)inline js:-->define js effect for single html element
b)internal js:-->can be used by current web page
<script type="text/javascript">
code goes here
</script>

c)external js:-->can be used by entire application


<script type="text/javascript" src="location of js/js file"></script>

5)javascript can change html attribute value:-->

6)Javascript can hide html element:-->

7)Javascript can change text size:

8)javascript output:-->
a)innerHTML:-->
b)innerText:-->
c)[Link]():-->
d)[Link]():-->
e)[Link]():-->
f)[Link]():-->

9)Javascript variables:-->variables are used to store data values


a)How to declare variables in javascript
I)var :--> was used from 1995 to 2015(for older browsers)
II)const:-->can be used for array and object if value changed
III)let:-->can be used in any case

10)Javascript Arrays:-->Can hold multiple values in singal variable


a)We can create array using keyword new
b)accessing array values
c)changing index values
d)how convert array to string = toString();

Common questions

Powered by AI

JavaScript provides several methods for outputting data: innerHTML and innerText can update or display content within a webpage element, document.write() can write directly to the HTML document, window.alert() presents a popup alert, console.log() outputs to the browser console for debugging, and window.print() allows printing of the current page .

From 1995 to 2015, JavaScript primarily used var for variable declaration, which is function-scoped. As the language evolved, let and const were introduced in ES6, providing block scope and offering better control over variable scope in modern development. 'Let' is used for variables expected to change, while 'const' is used when variables should not be reassigned, enhancing clarity and reducing potential errors in code .

JavaScript was invented by Brendan Eich in 1995 to enable developers to program the behavior of web pages, making them more dynamic and interactive, which was a growing need as the web expanded .

JavaScript arrays are used to store multiple values in a single variable. They can be created using the 'new' keyword and manipulated in various ways, such as accessing values with index, changing index values, and converting arrays to strings using the toString() method .

Although JavaScript and Java share part of their names and some syntax, they are completely different in concept and design. Java is a class-based, object-oriented programming language used for building complex applications, while JavaScript is a lightweight, interpreted language traditionally used for adding interactivity and dynamic content to webpages .

JavaScript enhances web page functionality by allowing programmers to define the behavior of a web page, whereas HTML defines the content and CSS defines the layout and design . Furthermore, JavaScript can perform dynamic operations like updating and changing HTML and CSS, as well as calculating, manipulating, and updating data .

Inline JavaScript defines effects for a single HTML element by directly embedding the script within the element's tag. Internal JavaScript is written within a <script> tag in the HTML document's head or body, affecting only that web page. External JavaScript is stored in a separate file and linked to the HTML document through a <script> tag with the src attribute, allowing the script to be used across different pages of an application .

ECMAScript is the official name for JavaScript, serving as a standardized specification to ensure consistency and compatibility across different browsers. ES6, or ECMAScript 6, represents the sixth edition of the standard, introducing significant improvements and new features to the language, which modern JavaScript is built upon .

Variables in JavaScript are used to store and manipulate data values. JavaScript declares variables using var, let, or const, each with different scopes and use cases: 'var' has function scope and was traditionally used; 'let' supports block scope, suitable for modern usage; 'const' also provides block scope and is used when the variable should not be reassigned, though arrays and objects that are constant can still have their contents modified .

JavaScript can manipulate HTML elements in several ways: it can update HTML content, change HTML attribute values, hide HTML elements, and change text size . Javascript can also output data to the HTML using various methods, such as innerHTML, innerText, document.write(), window.alert(), console.log(), and window.print().

You might also like