Learn JavaScript basic

Stela Capsa
Sep 14, 2021

1.Values are piece of data. This are some examples of values in JavaScript.

console.log("beautiful")
console.log(50)

2.This is call declaring a name, we assign the value “kim” to the variable name firstName.

let firstName = "Kim"

if console.log, the value should appear in the browser console.

3.Conventions and rules in JS.

JS doesn’t accept just any names of variables, we can use next format of variables name

Camelcase

  • firstName
  • formTagName

Singular word

  • name
  • verb

Is prohibited in JS variables to start with a number

An error will show the row number where is happening and the name of it, this error is Syntax Error.

--

--