javascript part 1 Flashcards
java is ____ type of language
strong
javascript is _____ type of language
weak
Supports object-oriented and imperative programming styles was standardised as ECMScript 1. True or False?
False. it is ECMAScript
What are the 6 primitive type of javascript?
undefined variables null value denoting intentional lack of a value Boolean Number String
anon = function() { print(‘I am hii’); }
if you want to use this function. what would you type?
anon();
anon = function() { print(‘oh’); }
What type of function is this?
Anonymus function. it would be defined if we had written it as: function anon()
method to return character at index N
charAt(N)
method to returns index of S in string
indexOf(S)
method to returns last index of S in string
lastIndexOf(S)
what does the .length method do?
returns length of string
method to returns array of substrings separated by S
Split(S)
substring(M) will output:
returns substring from index to end
substring(M, N) will output:
returns substring from element M to N.
how to add two strings without the + symbol
a.concat(b)
let arr = [‘a’, 2, ‘c’];
alert( arr[9] );
what will be the output?
array out of boundary.