JavaScript

JavaScript is a lightweight, cross platform, object oriented programming language.

lightweight: it takes very less system memory

cross platform: can be run on multiple platforms and systems

object oriented : js is a language based on object

JavaScript is one of the three core technologies(HTML & CSS)

JavaScript is most commonly used as a part of webpages. It can be used in different places.

  • Client Side : JavaScript was used only in browser  for many years.
  • Server Side : With development of Node.js we are able to use JavaScript in the server side as well.
JavaScript made modern web development possible. With JS we are able to have dynamic effects and are building modern web applications that we can interact with.

Truthy and falsy values

Truthy Values:

“0”
“false”
empty functions
empty arrays
empty objects
typeof(null)

these above listed items are considered true in javascript

Falsy values:

false
0
“”
null
undefined
NaN(Not a number)

These are considered false.

When dealing with these truthy and falsy values we should be careful and always try to use “===” or “!==” when we need to compare .

p5.js

p5.js is a JavaScript library which can be used by artists,designers,educators and beginners who want to code. Using p5.js we have a full set of drawing functionality and this is not limited to canvas alone, we can make use of addon libraries from p5.js and easily interact with other html objects like text, input, video, webcam and sound.