Anna CS 3291 - What is JavaScript

Unformatted text preview:

What is JavaScript JavaScript is a programming language used to create interactive websites and web applications It is often used in conjunction with HTML and CSS What can you do with JavaScript With JavaScript you can add interactivity to websites through features like pop ups drop down menus and animations It can also be used to validate user input manipulate the DOM and make HTTP requests What are some common JavaScript frameworks and libraries Some popular JavaScript frameworks and libraries include React Angular Vue js jQuery and Node js How do I get started with learning JavaScript There are many resources available online for learning JavaScript including tutorials documentation and online courses It s also helpful to practice writing your own code and experimenting with different features and techniques The World of JavaScript What is JavaScript What is ECMAScript JavaScript is one of the most popular and widely used programming languages in the world right now It s growing faster than any other programming language and big companies like Netflix use it JavaScript is a programming language that is used to create interactive effects within web browsers It is also used for server side programming mobile application development and game development ECMAScript is the standard on which JavaScript is based JavaScript is one of the implementations of ECMAScript but there are other implementations as well How Does JavaScript Work in a Browser JavaScript runs in the browser s JavaScript engine which interprets the code and executes it JavaScript code can be written directly in the HTML file or in a separate js file and linked to the HTML file using the script tag Features of JavaScript Object oriented programming Functional programming Dynamic typing Closures Asynchronous programming These features make JavaScript unique and different from other programming languages Getting a Job as a JavaScript Developer JavaScript developers in the US earn an average of 72 000 a year You can work as a frontend developer backend developer or full stack developer who knows both the front end and back end PayPal and Walmart build entire applications around JavaScript so there are plenty of opportunities for JavaScript developers If you want to learn JavaScript there are many resources available online Check out sites like JavaScript as a Service and JS as a Side to learn more What Can You Do with JavaScript JavaScript was originally designed to run only in browsers but now it can be used to build full blown web or mobile apps real time networking applications like chats and video streaming services command line tools and even games Large companies like Facebook and Google use the language to build interactive web pages and mobile apps It has many new features including the ability to run multiple languages at the same time and create web apps that can run in multiple languages Variables in Programming In programming we use variables to temporarily store data in a computer s memory These variables have a name and a memory location which allows us to read the data in the future It s best practice to use a lead keyword to declare a variable and there are rules for naming them Reserved keywords can t be used and each variable should start with a lowercase letter and use camel notation for subsequent words Declaring Variables Types of Variables The modern best practice is to declare each variable on a single line and end each declaration with a semicolon You can declare multiple variables on one line by separating them with a comma but it s better to use the first name last name method Variable names can t start with a number or contain spaces or special characters In JavaScript there are two categories of types primitives and reference types Primitives include strings numbers booleans undefined and null Strings A string is a sequence of characters enclosed in quotation marks You can declare a string variable using a string literal Numbers A number can be an integer or a decimal You can declare a number Booleans A boolean can be either true or false You can declare a boolean variable variable using a number literal using a boolean literal Undefined If a variable is declared but not initialized its value is undefined Null Null is used to indicate the absence of a value Constants Conclusion A constant is like a variable but its value can t be changed To declare a constant use the keyword const instead of let By following best practices and using meaningful variable names you can create more efficient and readable code Understanding the different types of variables and how to declare them is essential for programming in JavaScript


View Full Document

Anna CS 3291 - What is JavaScript

Download What is JavaScript
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view What is JavaScript and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view What is JavaScript 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?