Skip to content
    • info@hktsoft.net
  • Connecting and sharing with us
  • Login
  • About Us
    • info@hktsoft.net
HKT SOFTHKT SOFT
  • Home
  • Programming Languages
    • Popular Programming Languages
      • Core Java
      • JavaScript
      • Advanced Java
      • C
      • C#
      • C++
      • Python
      • PHP
      • HTML
      • CSS
    • Other Programming Languages
      • GitHub
      • Bootstrap
      • AngularJS
      • jQuery
      • MongoDB
      • NodeJS
      • Unix & Linux
    • Database
      • Basic Database
      • SQL
      • SQL Server
      • Data structures and algorithms
    • Website
      • WordPress
      • Joomla
      • Magento
      • Opencart
  • Corporate Management
    • Entrepreneurship
      • Startup
      • Entrepreneurship
      • Management Science
    • Managing primary activities
      • Marketing
      • Sales management
      • Retail management
      • Import – Export
      • International business
      • E-commerce
      • Project management
      • Product Management
      • Quality Management
      • Logistics Management
      • Supply Chain Management
    • Managing support activities
      • Strategy
      • Human Resource Management
      • Organizational Culture
      • Information System
      • Corporate Finance
      • Stock Market
      • Accounting
      • Office Management
  • Scientific Theories
    • Economic Theories
    • Social Theories
    • Political Theories
    • Philosophies
    • Theology
    • Art Movements
An introduction to JavaScript Programming Language

JavaScript was initially created to “make web pages alive”. The programs in this language are called scripts. They can be written right in a web page’s HTML and run automatically as the page loads. Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run. In this aspect, JavaScript is very different from another language [ ...]

26
Oct
What Is JavaScript?

1. What Is JavaScript? JavaScript was introduced in 1995 as a way to add programs to web pages in the Netscape Navigator browser. The language has since been adopted by all other major graphical web browsers. It has made modern web applications possible—applications with which you can interact directly without doing a page reload for [ [ ...]

26
Oct
Values in JavaScript

Imagine a sea of bits—an ocean of them. A typical modern computer has more than 30 billion bits in its volatile data storage (working memory). Non­volatile storage (the hard disk or equivalent) tends to have yet a few orders of magnitude more. To be able to work with such quantities of bits without getting lost, [ [ ...]

26
Oct
Numbers in JavaScript

Values of the number type are, unsurprisingly, numeric values. In a JavaScript program, they are written as follows: 13 Use that in a program, and it will cause the bit pattern for the number 13 to come into existence inside the computer’s memory. JavaScript uses a fixed number of bits, 64 of them, to store [ [ ...]

27
Oct
Strings in JavaScript

The next basic data type is the string. Strings are used to represent text. They are written by enclosing their content in quotes. ‘Down on the sea’ “Lie on the ocean” ‘Float on the ocean’ You can use single quotes, double quotes, or backticks to mark strings, as long as the quotes at the start [ [ ...]

27
Oct
Unary Operators in JavaScript

Not all operators are symbols. Some are written as words. One example is the typeof operator, which produces a string value naming the type of the value you give it. console.log(typeof 4.5) // → number console.log(typeof “x”) // → string We will use console.log in example code to indicate that we want to see the [ [ ...]

27
Oct
Boolean Values in JavaScript

It is often useful to have a value that distinguishes between only two possibil­ities, like “yes” and “no” or “on” and “off.” For this purpose, JavaScript has a Boolean type, which hasjust two values, true and false, which are written as those words. Comparison Here is one way to produce Boolean values: console.log(3 > 2) [ [ ...]

27
Oct
Empty Values in JavaScript

There are two special values, written null and undefined, that are used to denote the absence of a meaningful value. They are themselves values, but they carry no information. Many operations in the language that don’t produce a meaningful value (you’ll see some later) yield undefined simply because they have to yield some value. The [ [ ...]

27
Oct
Automatic Type Conversion in JavaScript

In the Introduction, I mentioned that JavaScript goes out of its way to accept almost any program you give it, even programs that do odd things. This is nicely demonstrated by the following expressions: console.log(8 * null) // → 0 console.log(“5” – 1) // → 4 console.log(“5” + 1) // → 51 console.log(“five” * 2) [ [ ...]

27
Oct
Expressions and Statements in JavaScript

In Chapter 1, we made values and applied operators to them to get new values. Creating values like this is the main substance of any JavaScript pro­gram. But that substance has to be framed in a larger structure to be useful. So that’s what we’ll cover next. A fragment of code that produces a value [ [ ...]

27
Oct
Bindings in JavaScript

1. Bindings How does a program keep an internal state? How does it remember things? We have seen how to produce new values from old values, but this does not change the old values, and the new value has to be immediately used or it will dissipate again. To catch and hold values, JavaScript provides [ [ ...]

27
Oct
The Environment in JavaScript

The collection of bindings and their values that exist at a given time is called the environment. When a program starts up, this environment is not empty. It always contains bindings that are part of the language standard, and most of the time, it also has bindings that provide ways to interact with the surround­ing [ [ ...]

27
Oct
Functions in JavaScript

1. Functions A lot of the values provided in the default environment have the type func­tion. A function is a piece of program wrapped in a value. Such values can be applied in order to run the wrapped program. For example, in a browser environment, the binding prompt holds a function that shows a little [ [ ...]

27
Oct
Return Values in JavaScript

Showing a dialog box or writing text to the screen is a side effect. A lot of functions are useful because of the side effects they produce. Functions may also produce values, in which case they don’t need to have a side effect to be useful. For example, the function Math.max takes any amount of [ [ ...]

27
Oct
Control Flow in JavaScript

When your program contains more than one statement, the statements are executed as if they are a story, from top to bottom. This example program has two statements. The first one asks the user for a number, and the sec­ond, which is executed after the first, shows the square of that number. let theNumber = [ [ ...]

27
Oct
Conditional Execution in JavaScript

Not all programs are straight roads. We may, for example, want to create a branching road, where the program takes the proper branch based on the situation at hand. This is called conditional execution. Conditional execution is created with the if keyword in JavaScript. In the simple case, we want some code to be executed [ [ ...]

27
Oct
while and do Loops in JavaScript

Consider a program that outputs all even numbers from 0 to 12. One way to write this is as follows: console.log(o); console.log(2); console.log(4); console.log(6); console.log(8); console.log(lO); console.log(12); That works, but the idea of writing a program is to make something less work, not more. If we needed all even numbers less than 1,000, this approach [ [ ...]

27
Oct
Indenting Code in JavaScript

In the examples, I’ve been adding spaces in front of statements that are part of some larger statement. These spaces are not required—the computer will accept the programjust fine without them. In fact, even the line breaks in programs are optional. You could write a program as a single long line if you felt like [ [ ...]

27
Oct
for Loops in JavaScript

Many loops follow the pattern shown in the while examples. First a “counter” binding is created to track the progress of the loop. Then comes a while loop, usually with a test expression that checks whether the counter has reached its end value. At the end of the loop body, the counter is updated to [ [ ...]

27
Oct
Updating Bindings Succinctly in JavaScript

Having the looping condition produce false is not the only way a loop can finish. There is a special statement called break that has the effect of immedi- atelyjumping out of the enclosing loop. This program illustrates the break statement. It finds the first number that is both greater than or equal to 20 and [ [ ...]

27
Oct
  • 1
  • 2
  • 3
  • 4
  • 5
Corporate Management
  • E-commerce Business: How to Build, Launch, and Grow a Profitable Online StoreE-commerce Business: How to Build, Launch, and Grow a Profitable Online Store
  • Entrepreneurship and StartupEntrepreneurship and Startup
  • Production Management : Definition, Function and ScopeProduction Management : Definition, Function and Scope
  • Stock market: functioning and investmentsStock market: functioning and investments
  • Retail Management: Definition, Processes, Best PracticesRetail Management: Definition, Processes, Best Practices
  • Logistics Management: meaning, functions, importance, process and best practicesLogistics Management: meaning, functions, importance, process and best practices

Scientific Theories
  • Great Thinkers and their Big IdeasGreat Thinkers and their Big Ideas
  • List of Art movementsList of Art movements
  • Economic Theories and ConceptsEconomic Theories and Concepts
  • Philosophical Theories and ConceptPhilosophical Theories and Concept
  • Social Theories and ConceptsSocial Theories and Concepts
  • List of Theological Belief SystemsList of Theological Belief Systems

Hãy ủng hộ và đồng hành cùng chúng tôi

... trong chia sẻ và phổ biến kiến thức bằng các hành động thiết thực và hoàn toàn miễn phí của bạn.

hotlineTThảo luận đóng góp ý kiến

Nhiệt tình tham gia thảo luận và nêu ý kiến đóng góp, kinh nghiệm thực tế của bạn qua từng bài viết, videos trên website của chúng tôi.

hỗ trợ hkt Chia sẻ có bản quyền

Hãy cập nhật và chia sẻ rộng rãi các bài viết, videos có ghi rõ nguồn của chúng tôi trên Facebook và các kênh thông tin của bạn.

hỗ trợ hkt Đăng ký và likes bài viết, videos

Ủng hộ chúng tôi về tinh thần và bằng những hành động thiết thực và hoàn toàn miễn phí của các bạn trên kênh thông tin của chúng tôi.

HKT Soft

About HKT CHANNEL
About HKT CONSULTANT

Website Structure

Java & JavaScript ,  C & C# & C++,  Python
PHP,  HTML,  CSS, GitHub,   Bootstrap,   Unix & Lunix
Database,  SQL,  SQL Server, Data structures and algorithms 

HKT Consultant JSC.

      "Knowledge - Experience - Success"
- Email: Info@hktsoft.net
- Website:
hktsoft.net

  • Home
  • Programming Languages
    • Popular Programming Languages
      • Core Java
      • JavaScript
      • Advanced Java
      • C
      • C#
      • C++
      • Python
      • PHP
      • HTML
      • CSS
    • Other Programming Languages
      • GitHub
      • Bootstrap
      • AngularJS
      • jQuery
      • MongoDB
      • NodeJS
      • Unix & Linux
    • Database
      • Basic Database
      • SQL
      • SQL Server
      • Data structures and algorithms
    • Website
      • WordPress
      • Joomla
      • Magento
      • Opencart
  • Corporate Management
    • Entrepreneurship
      • Startup
      • Entrepreneurship
      • Management Science
    • Managing primary activities
      • Marketing
      • Sales management
      • Retail management
      • Import – Export
      • International business
      • E-commerce
      • Project management
      • Product Management
      • Quality Management
      • Logistics Management
      • Supply Chain Management
    • Managing support activities
      • Strategy
      • Human Resource Management
      • Organizational Culture
      • Information System
      • Corporate Finance
      • Stock Market
      • Accounting
      • Office Management
  • Scientific Theories
    • Economic Theories
    • Social Theories
    • Political Theories
    • Philosophies
    • Theology
    • Art Movements
  • About-Us

Login

Lost your password?