Mind map
JS syntax
Map content
JS syntax
variables
- boolean
- flag var
- string
- toLowerCase( )
- converts all the characters to lower case
- toUpperCase( )
- converts all the character to upper case
- lastIndexOf( )
- finds last instance of the segment (gives number location)
- indexOf( )
- the method finds the index of the first character of the segment (gives index location)
- charAt( )
- finds (and asign to another variable) the single character of index at the string (specify variable index) can only identify character by specific location.
- replace( )
- string replacing in the first instance of segment /string/g this is global replacing for all met instances
- toLowerCase( )
- Numbers
- parseInt ( )
- converts strings including floatings to integer and also cut floatings to integer
- parseFloat( )
- convert floating strings to floating number
- Number
- Converts "numbered"string to integer or floating strings to floating point numbers
- toString( )
- converts number to string
- toFixed(n)
- controlling the length of decimal. "n" in the brackets specifies decimal point for floating number and convert them to strings. some browser round down!.
- Math.round( )
- rounds floating number to the nearest Integer
- Math.ceil( )
- round up to the nearest Integer
- Math.floor( )
- rounds to the lower Integer
- parseInt ( )
- Arrays
- pop( )
- removes the last element of array
- push( )
- adds one or more elements to the end of array
- shift( )
- removes element from the beginning of the array
- unshift( )
- add one or more elements to the beginning of the array
- splice( )
- to insert one or more elements anywhere in array ... optionally remove one or more elements that come after it
- slice( )
- to copy one or more consecutive elements in any position ... and put them into a new array
- pop( )
- boolean
popup windows
- alert ( )
- prompt( )
logic
- comparison operator
- === == !=== !== < > <= >=
- if else
- conditions
- && II
- ternary conditions
- var age = 26; var beverage = (age >= 21) ? "Beer" : "Juice"; // "Beer"
- if .. if else
- nested if
- comparison operator
counters
- maths expressions
- num++
- incremented post it means added +1 after signing of to variable
- ++num
- incremented prior increased value before assigning to variable
- num--
- decremented post minus 1 after signed to variable
- --num
- decremented prior minus 1 before signing to variable
- num++
- for loop
- maths expressions
Date & Time
- getDay( )
- get days in the number 0-6, starting from Sunday
- getMonth( )
- gets numbers 0-11 , starting from January
- getDate( )
- gets number 0-31, 1 is 1st day of the month
- getFullYear( )
- getHours( )
- 0 - is midnight 12 - is soon
- getMinutes( )
- in the range of 0-59
- getSeconds( )
- gets seconds in the range of 0-59
- getMilliseconds( )
- get milliseconds in the range 0-999
- getTime( )
- getDay( )
Images and files in the map
Information
- Description
- Cambridge Programming Mind Map on JS syntax, created by Raf Jablonsky on 24/10/2018.
- Created by
- Raf Jablonsky
- Views
- 2
- Tags
- Rating