Monday, June 27, 2016

Phrontistery: Sciences and Studies

Sciences and Studies

This list defines 633 sciences, arts and studies of various degrees of respectability and rarity, ranging from the common and esteemed (chemistry) to the obscure and quirky (peristerophily). Over the past century, the range and scope of scientific endeavours has expanded exponentially, so that practically any field of study has a name associated with it. Most of these terms end in 'ology', from the Greek logos, meaning 'word'.

WordDefinition
acarologystudy of mites
accidencegrammar book; science of inflections in grammar
aceologytherapeutics
acologystudy of medical remedies
acousticsscience of sound
adenologystudy of glands
aedoeologyscience of generative organs
aerobiologystudy of airborne organisms
aerodoneticsscience or study of gliding
aerodynamicsdynamics of gases; science of movement in a flow of air or gas
aerolithologystudy of aerolites; meteorites
aerologystudy of the atmosphere
aeronauticsstudy of navigation through air or space
aerophilatelycollecting of air-mail stamps
aerostaticsscience of air pressure; art of ballooning
agonisticsart and theory of prize-fighting
agriologythe comparative study of primitive peoples
agrobiologystudy of plant nutrition; soil yields
agrologystudy of agricultural soils
agronomicsstudy of productivity of land
agrostologyscience or study of grasses
alethiologystudy of truth
algedonicsscience of pleasure and pain
algologystudy of algae
anaesthesiologystudy of anaesthetics
anaglypticsart of carving in bas-relief
anagraphyart of constructing catalogues
anatomystudy of the structure of the body
andragogyscience of teaching adults
anemologystudy of winds
angelologystudy of angels
angiologystudy of blood flow and lymphatic system
anthropobiologystudy of human biology
anthropologystudy of human cultures
aphnologyscience of wealth
apiologystudy of bees
arachnologystudy of spiders
archaeologystudy of human material remains
archelogythe study of first principles
archologyscience of the origins of government
arctophilystudy of teddy bears
areologystudy of Mars
aretaicsthe science of virtue
aristologythe science or art of dining
arthrologystudy of joints
astacologythe science of crayfish
astheniologystudy of diseases of weakening and aging
astrogeologystudy of extraterrestrial geology
astrologystudy of influence of stars on people
astrometeorologystudy of effect of stars on climate
astronomystudy of celestial bodies
astrophysicsstudy of behaviour of interstellar matter
astroseismologystudy of star oscillations
atmologythe science of aqueous vapour
audiologystudy of hearing
autecologystudy of ecology of one species
autologyscientific study of oneself
auxologyscience of growth
avionicsthe science of electronic devices for aircraft
axiologythe science of the ultimate nature of values
bacteriologystudy of bacteria
balneologythe science of the therapeutic use of baths
barodynamicsscience of the support and mechanics of bridges
barologystudy of gravitation
batologythe study of brambles
bibliologystudy of books
biblioticsstudy of documents to determine authenticity
bioecologystudy of interaction of life in the environment
biologystudy of life
biometricsstudy of biological measurement
bionomicsstudy of organisms interacting in their environments
botanystudy of plants
bromatologystudy of food
brontologyscientific study of thunder
bryologythe study of mosses and liverworts
cacogenicsstudy of racial degeneration
caliologystudy of bird's nests
calorificsstudy of heat
cambistryscience of international exchange
campanologythe art of bell ringing
carcinologystudy of crabs and other crustaceans
cardiologystudy of the heart
caricologystudy of sedges
carpologystudy of fruit
cartographythe science of making maps and globes
cartophilythe hobby of collecting cigarette cards
castrametationthe art of designing a camp
catacousticsscience of echoes or reflected sounds
catalacticsscience of commercial exchange
catechecticsthe art of teaching by question and answer
cetologystudy of whales and dolphins
chalcographythe art of engraving on copper or brass
chalcotripticsart of taking rubbings from ornamental brasses
chaologythe study of chaos or chaos theory
characterologystudy of development of character
chemistrystudy of properties of substances
chirocosmeticsbeautifying the hands; art of manicure
chirographystudy of handwriting or penmanship
chirologystudy of the hands
chiropodymedical science of feet
chorologyscience of the geographic description of anything
chrematisticsthe study of wealth; political economy
chronobiologystudy of biological rhythms
chrysologystudy of precious metals
ciselurethe art of chasing metal
climatologystudy of climate
clinologystudy of aging or individual decline after maturity
codicologystudy of manuscripts
coleopterologystudy of beetles and weevils
cometologystudy of comets
conchologystudy of shells
coprologystudy of pornography
cosmetologystudy of cosmetics
cosmologystudy of the universe
craniologystudy of the skull
criminologystudy of crime; criminals
cryobiologystudy of life under cold conditions
cryptologystudy of codes
cryptozoologystudy of animals for whose existence there is no conclusive proof
ctetologystudy of the inheritance of acquired characteristics
cynologyscientific study of dogs
cytologystudy of living cells
dactyliologystudy of rings
dactylographythe study of fingerprints
dactylologystudy of sign language
deltiologythe collection and study of picture postcards
demologystudy of human behaviour
demonologystudy of demons
dendrochronologystudy of tree rings
dendrologystudy of trees
deontologythe theory or study of moral obligation
dermatoglyphicsthe study of skin patterns and fingerprints
dermatologystudy of skin
desmologystudy of ligaments
diabologystudy of devils
diagraphicsart of making diagrams or drawings
dialectologystudy of dialects
dioptricsstudy of light refraction
diplomaticsscience of deciphering ancient writings and texts
diplomatologystudy of diplomats
docimologythe art of assaying
dosiologythe study of doses
dramaturgyart of producing and staging dramatic works
dysgenicsthe study of racial degeneration
dysteleologystudy of purposeless organs
ecclesiologystudy of church affairs
eccrinologystudy of excretion
ecologystudy of environment
economicsstudy of material wealth
edaphologystudy of soils
Egyptologystudy of ancient Egypt
ekisticsstudy of human settlement
electrochemistrystudy of relations between electricity and chemicals
electrologystudy of electricity
electrostaticsstudy of static electricity
embryologystudy of embryos
emetologystudy of vomiting
emmenologythe study of menstruation
endemiologystudy of local diseases
endocrinologystudy of glands
enigmatologystudy of enigmas
entomologystudy of insects
entozoologystudy of parasites that live inside larger organisms
enzymologystudy of enzymes
ephebiatricsbranch of medicine dealing with adolescence
epidemiologystudy of diseases; epidemics
epileptologystudy of epilepsy
epistemologystudy of grounds of knowledge
eremologystudy of deserts
ergologystudy of effects of work on humans
ergonomicsstudy of people at work
escapologystudy of freeing oneself from constraints
eschatologystudy of death; final matters
ethnogenystudy of origins of races or ethnic groups
ethnologystudy of cultures
ethnomethodologystudy of everyday communication
ethnomusicologystudy of comparative musical systems
ethologystudy of natural or biological character
ethonomicsstudy of economic and ethical principles of a society
etiologythe science of causes; especially of disease
etymologystudy of origins of words
euthenicsscience concerned with improving living conditions
exobiologystudy of extraterrestrial life
floristrythe art of cultivating and selling flowers
fluviologystudy of watercourses
folkloristicsstudy of folklore and fables
futurologystudy of future
garbologystudy of garbage
gastroenterologystudy of stomach; intestines
gastronomystudy of fine dining
gemmologystudy of gems and jewels
genealogystudy of descent of families
genesiologystudy of reproduction and heredity
genethlialogythe art of casting horoscopes
geochemistrystudy of chemistry of the earth's crust
geochronologystudy of measuring geological time
geogenyscience of the formation of the earth's crust
geogonystudy of formation of the earth
geographystudy of surface of the earth and its inhabitants
geologystudy of earth's crust
geomorphogenystudy of the origins of land forms
geoponicsstudy of agriculture
geotechnicsstudy of increasing habitability of the earth
geratologystudy of decadence and decay
gerocomystudy of old age
gerontologystudy of the elderly; aging
gigantologystudy of giants
glaciologystudy of ice ages and glaciation
glossologystudy of language; study of the tongue
glyptographythe art of engraving on gems
glyptologystudy of gem engravings
gnomonicsthe art of measuring time using sundials
gnosiologystudy of knowledge; philosophy of knowledge
gnotobiologystudy of life in germ-free conditions
graminologystudy of grasses
grammatologystudy of systems of writing
graphemicsstudy of systems of representing speech in writing
graphologystudy of handwriting
gromaticsscience of surveying
gynaecologystudy of women’s physiology
gyrostaticsthe study of rotating bodies
haemataulicsstudy of movement of blood through blood vessels
hagiologystudy of saints
halieuticsstudy of fishing
hamartiologystudy of sin
harmonicsstudy of musical acoustics
hedonicspart of ethics or psychology dealing with pleasure
helcologystudy of ulcers
heliologyscience of the sun
helioseismologystudy of sun's interior by observing its surface oscillations
helminthologystudy of worms
hematologystudy of blood
heortologystudy of religious feasts
hepatologystudy of liver
heraldrystudy of coats of arms
heresiologystudy of heresies
herpetologystudy of reptiles and amphibians
hierologyscience of sacred matters
hippiatricsstudy of diseases of horses
hippologythe study of horses
histologystudy of the tissues of organisms
histopathologystudy of changes in tissue due to disease
historiographystudy of writing history
historiologystudy of history
homileticsthe art of preaching
hoplologythe study of weapons
horographyart of constructing sundials or clocks
horologyscience of time measurement
horticulturestudy of gardening
hydrobiologystudy of aquatic organisms
hydrodynamicsstudy of movement in liquids
hydrogeologystudy of ground water
hydrographystudy of investigating bodies of water
hydrokineticsstudy of motion of fluids
hydrologystudy of water resources
hydrometeorologystudy of atmospheric moisture
hydropathystudy of treating diseases with water
hyetologyscience of rainfall
hygiasticsscience of health and hygiene
hygienicsstudy of sanitation; health
hygiologyhygienics; study of cleanliness
hygrologystudy of humidity
hygrometryscience of humidity
hymnographystudy of writing hymns
hymnologystudy of hymns
hypnologystudy of sleep; study of hypnosis
hypsographyscience of measuring heights
iamatologystudy of remedies
iatrologytreatise or text on medical topics; study of medicine
iatromathematicsarchaic practice of medicine in conjunction with astrology
ichnographyart of drawing ground plans; a ground plan
ichnologyscience of fossilized footprints
ichthyologystudy of fish
iconographystudy of drawing symbols
iconologystudy of icons; symbols
ideogenystudy of origins of ideas
ideologyscience of ideas; system of ideas used to justify behaviour
idiomologystudy of idiom, jargon or dialect
idiopsychologypsychology of one's own mind
immunogeneticsstudy of genetic characteristics of immunity
immunologystudy of immunity
immunopathologystudy of immunity to disease
insectologystudy of insects
irenologythe study of peace
iridologystudy of the iris; diagnosis of disease based on the iris of the eye
kalologystudy of beauty
karyologystudy of cell nuclei
kidologystudy of kidding
kinematicsstudy of motion
kinesicsstudy of gestural communication
kinesiologystudy of human movement and posture
kineticsstudy of forces producing or changing motion
koniologystudy of atmospheric pollutants and dust
ktenologyscience of putting people to death
kymatologystudy of wave motion
labeorphilycollection and study of beer bottle labels
larithmicsstudy of population statistics
laryngologystudy of larynx
lepidopterologystudy of butterflies and moths
leprologystudy of leprosy
lexicologystudy of words and their meanings
lexigraphyart of definition of words
lichenologystudy of lichens
limacologystudy of slugs
limnobiologystudy of freshwater ecosystems
limnologystudy of bodies of fresh water
linguisticsstudy of language
lithologystudy of rocks
liturgiologystudy of liturgical forms and church rituals
loimologystudy of plagues and epidemics
loxodromystudy of sailing along rhumb-lines
magiricsart of cookery
magnanerieart of raising silkworms
magneticsstudy of magnetism
malacologystudy of molluscs
malariologystudy of malaria
mammalogystudy of mammals
manègethe art of horsemanship
Mariologystudy of the Virgin Mary
martyrologystudy of martyrs
mastologystudy of mammals
mathematicsstudy of magnitude, number, and forms
mazologymammalogy; study of mammals
mechanicsstudy of action of force on bodies
meconologystudy of or treatise concerning opium
melittologystudy of bees
mereologystudy of part-whole relationships
mesologyecology
metallogenystudy of the origin and distribution of metal deposits
metallographystudy of the structure and constitution of metals
metallurgystudy of alloying and treating metals
metaphysicsstudy of principles of nature and thought
metapoliticsstudy of politics in theory or abstract
metapsychologystudy of nature of the mind
meteoriticsthe study of meteors
meteorologystudy of weather
metricsstudy of versification
metrologyscience of weights and measures
microanatomystudy of microscopic tissues
microbiologystudy of microscopic organisms
microclimatologystudy of local climates
micrologystudy or discussion of trivialities
micropalaeontologystudy of microscopic fossils
microphytologystudy of very small plant life
microscopystudy of minute objects
mineralogystudy of minerals
molinologystudy of mills and milling
momilogystudy of mummies
morphologystudy of forms and the development of structures
muscologythe study of mosses
museologythe study of museums
musicologystudy of music
mycologystudy of funguses
myologystudy of muscles
myrmecologystudy of ants
mythologystudy of myths; fables; tales
naologystudy of church or temple architecture
nasologystudy of the nose
nauticsart of navigation
nematologythe study of nematodes
neonatologystudy of newborn babies
neossologystudy of nestling birds
nephologystudy of clouds
nephrologystudy of the kidneys
neurobiologystudy of anatomy of the nervous system
neurologystudy of nervous system
neuropsychologystudy of relation between brain and behaviour
neurypnologystudy of hypnotism
neutrosophystudy of the origin and nature of philosophical neutralities
nidologystudy of nests
nomologythe science of the laws; especially of the mind
noologyscience of the intellect
nosologystudy of diseases
nostologystudy of senility
notaphilycollecting of bank-notes and cheques
numerologystudy of numbers
numismaticsstudy of coins
nymphologystudy of nymphs
obstetricsstudy of midwifery
oceanographystudy of oceans
oceanologystudy of oceans
odologyscience of the hypothetical mystical force of od
odontologystudy of teeth
oenologystudy of wines
oikologyscience of housekeeping
olfactologystudy of the sense of smell
ombrologystudy of rain
oncologystudy of tumours
oneirologystudy of dreams
onomasiologystudy of nomenclature
onomasticsstudy of proper names
ontologyscience of pure being; the nature of things
oologystudy of eggs
ophiologystudy of snakes
ophthalmologystudy of eye diseases
opticsstudy of light
optologystudy of sight
optometryscience of examining the eyes
orchidologystudy of orchids
ornithologystudy of birds
orologystudy of mountains
orthoepystudy of correct pronunciation
orthographystudy of spelling
orthopterologystudy of cockroaches
oryctologymineralogy or paleontology
osmicsscientific study of smells
osmologystudy of smells and olfactory processes
osphresiologystudy of the sense of smell
osteologystudy of bones
otologystudy of the ear
otorhinolaryngologystudy of ear, nose and throat
paedologystudy of children
paedotrophyart of rearing children
paidonosologystudy of children's diseases; pediatrics
palaeoanthropologystudy of early humans
palaeobiologystudy of fossil plants and animals
palaeoclimatologystudy of ancient climates
palaeolimnologystudy of ancient fish
palaeolimnologystudy of ancient lakes
palaeontologystudy of fossils
palaeopedologystudy of early soils
paleobotanystudy of ancient plants
paleo-osteologystudy of ancient bones
palynologystudy of pollen
papyrologystudy of paper
parapsychologystudy of unexplained mental phenomena
parasitologystudy of parasites
paroemiologystudy of proverbs
parthenologystudy of virgins
pataphysicsthe science of imaginary solutions
pathologystudy of disease
patrologystudy of early Christianity
pedagogicsstudy of teaching
pedologystudy of soils
pelologystudy of mud
penologystudy of crime and punishment
periodonticsstudy of gums
peristerophilypigeon-collecting
pestologyscience of pests
petrologystudy of rocks
pharmacognosystudy of drugs of animal and plant origin
pharmacologystudy of drugs
pharologystudy of lighthouses
pharyngologystudy of the throat
phenologystudy of organisms as affected by climate
phenomenologystudy of phenomena
philatelystudy of postage stamps
philematologythe act or study of kissing
phillumenycollecting of matchbox labels
philologystudy of ancient texts; historical linguistics
philosophyscience of knowledge or wisdom
phoniatricsstudy and correction of speech defects
phonologystudy of speech sounds
photobiologystudy of effects of light on organisms
phraseologystudy of phrases
phrenologystudy of bumps on the head
phycologystudy of algae and seaweeds
physicsstudy of properties of matter and energy
physiologystudy of processes of life
phytologystudy of plants; botany
piscatologystudy of fishes
pisteologyscience or study of faith
planetologystudy of planets
plutologypolitical economy; study of wealth
pneumaticsstudy of mechanics of gases
podiatrystudy and treatment of disorders of the foot; chiropody
podologystudy of the feet
polemologystudy of war
pomologystudy of fruit-growing
posologyscience of quantity or dosage
potamologystudy of rivers
praxeologystudy of practical or efficient activity; science of efficient action
primatologystudy of primates
proctologystudy of rectum
prosodystudy of versification
protistologystudy of protists
proxemicsstudy of man’s need for personal space
psalligraphythe art of paper-cutting to make pictures
psephologystudy of election results and voting trends
pseudologyart or science of lying
pseudopticsstudy of optical illusions
psychobiologystudy of biology of the mind
psychogeneticsstudy of internal or mental states
psychognosystudy of mentality, personality or character
psychologystudy of mind
psychopathologystudy of mental illness
psychophysicsstudy of link between mental and physical processes
pteridologystudy of ferns
pterylologystudy of distribution of feathers on birds
pyretologystudy of fevers
pyrgologystudy of towers
pyroballogystudy of artillery
pyrographystudy of woodburning
quinologystudy of quinine
raciologystudy of racial differences
radiologystudy of X-rays and their medical applications
reflexologystudy of reflexes
rhabdologyknowledge or learning concerning divining rods
rhabdologyart of calculating using numbering rods
rheologyscience of the deformation or flow of matter
rheumatologystudy of rheumatism
rhinologystudy of the nose
rhochrematicsscience of inventory management and the movement of products
runologystudy of runes
sarcologystudy of fleshy parts of the body
satanologystudy of the devil
scatologystudy of excrement or obscene literature
schematonicsart of using gesture to express tones
sciagraphyart of shading
scripophilycollection of bond and share certificates
sedimentologystudy of sediment
seismologystudy of earthquakes
selenodesystudy of the shape and features of the moon
selenologystudy of the moon
semanticsstudy of meaning
semantologyscience of meanings of words
semasiologystudy of meaning; semantics
semiologystudy of signs and signals
semioticsstudy of signs and symbols
serologystudy of serums
sexologystudy of sexual behaviour
siderographyart of engraving on steel
sigillographystudy of seals
significsscience of meaning
silvicsstudy of tree's life
sindonologystudy of the shroud of Turin
Sinologystudy of China
sitologydietetics
sociobiologystudy of biological basis of human behaviour
sociologystudy of society
somatologyscience of the properties of matter
sophiologyscience of ideas
soteriologystudy of theological salvation
spectrologystudy of ghosts
spectroscopystudy of spectra
speleologystudy and exploration of caves
spermologystudy of seeds
sphagnologystudy of peat moss
sphragisticsstudy of seals and signets
sphygmologystudy of the pulse
splanchnologystudy of the entrails or viscera
spongologystudy of sponges
stasiologystudy of political parties
staticsstudy of bodies and forces in equilibrium
stemmatologystudy of relationships between texts
stoichiologyscience of elements of animal tissues
stomatologystudy of the mouth
storiologystudy of folk tales
stratigraphystudy of geological layers or strata
stratographyart of leading an army
stylometrystudying literature by means of statistical analysis
suicidologystudy of suicide
symbologystudy of symbols
symptomatologystudy of symptoms of illness
synecologystudy of ecological communities
synecticsstudy of processes of invention
syntaxstudy of sentence structure
syphilologystudy of syphilis
systematologystudy of systems
taxidermyart of curing and stuffing animals
tectonicsscience of structure of objects, buildings and landforms
tegestologystudy and collecting of beer mats
teleologystudy of final causes; analysis in terms of purpose
telmatologystudy of swamps
teratologystudy of monsters, freaks, abnormal growths or malformations
teuthologystudy of cephalopods
textologystudy of the production of texts
thalassographyscience of the sea
thanatologystudy of death and its customs
thaumatologystudy of miracles
theologystudy of religion; religious doctrine
theriatricsveterinary medicine
theriogenologystudy of animals' reproductive systems
thermodynamicsstudy of relation of heat to motion
thermokinematicsstudy of motion of heat
thermologystudy of heat
therologystudy of wild mammals
thremmatologyscience of breeding domestic animals and plants
threpsologyscience of nutrition
tidologystudy of tides
timbrologystudy of postage stamps
tocologyobstetrics; midwifery
toneticsstudy of pronunciation
topologystudy of places and their natural features
toponymicsstudy of place-names
toreuticsstudy of artistic work in metal
toxicologystudy of poisons
toxophilylove of archery; archery; study of archery
traumatologystudy of wounds and their effects
tribologystudy of friction and wear between surfaces
trichologystudy of hair and its disorders
trophologystudy of nutrition
tsiganologystudy of gypsies
turneryart of turning in a lathe
typhlologystudy of blindness and the blind
typographyart of printing or using type
typologystudy of types of things
ufologystudy of alien spacecraft
uranographydescriptive astronomy and mapping
uranologystudy of the heavens; astronomy
urbanologystudy of cities
urenologystudy of rust molds
urologystudy of urine; urinary tract
venereologystudy of venereal disease
vermeologystudy of worms
vexillologystudy of flags
victimologystudy of victims
vinologyscientific study of vines and winemaking
virologystudy of viruses
vitricsglassy materials; glassware; study of glassware
volcanologystudy of volcanoes
vulcanologystudy of volcanoes
xylographyart of engraving on wood
xylologystudy of wood
zenographystudy of the planet Jupiter
zoiatricsveterinary surgery
zooarchaeologystudy of animal remains of archaeological sites
zoochemistrychemistry of animals
zoogeographystudy of geographic distribution of animals
zoogeologystudy of fossil animal remains
zoologystudy of animals
zoonomyanimal physiology
zoonosologystudy of animal diseases
zoopathologystudy of animal diseases
zoophysicsphysics of animal bodies
zoophysiologystudy of physiology of animals
zoophytologystudy of plant-like animals
zoosemioticsstudy of animal communication
zootaxyscience of classifying animals
zootechnicsscience of breeding animals
zygologyscience of joining and fastening
zymologyscience of fermentation
zymurgybranch of chemistry dealing with brewing and distilling

Friday, June 24, 2016

Top 85 JavaScript Interview Questions

Top 85 JavaScript Interview Questions

1. What is JavaScript?

JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages and is understood by web browsers. JavaScript is also an Object Oriented Programming language
2. Enumerate the differences between Java and JavaScript?
Java is a complete programming language. In contrast, JavaScript is a coded program that can be introduced to HTML pages. These two languages are not at all inter-dependent and are designed for the different intent.  Java is an object – oriented programming (OOPS) or structured programming language like C++ or C whereas JavaScript is a client-side scripting language and it is said to be unstructured programming.
3. What are JavaScript types?
Following are the JavaScript types:
  • Number
  • String
  • Boolean
  • Function
  • Object
  • Null
  • Undefined
4. What is the use of isNaN function?
isNan function returns true if the argument is not a number otherwise it is false.
5. Between JavaScript and an ASP script, which is faster?
JavaScript is faster. JavaScript is a client-side language and thus it does not need the assistance of the web server to execute. On the other hand, ASP is a server-side language and hence is always slower than JavaScript.  Javascript now is also a server side language (nodejs).
6. What is negative infinity?
Negative Infinity is a number in JavaScript which can be derived by dividing negative number by zero.
7. Is it possible to break JavaScript Code into several lines?
Breaking within a string statement can be done by the use of a backslash, ‘’, at the end of the first line
Example:  document.write("This is \a program");
And if you change to a new line when not within a string statement, then javaScript ignores break in line.
Example:
var x=1, y=2;
z=x+y;
The above code is perfectly fine, though not advisable as it hampers debugging.
8. Which company developed JavaScript?
Netscape is the software company who developed JavaScript.
9. What are undeclared and undefined variables?
Undeclared variables are those that do not exist in a program and are not declared. If the program tries to read the value of an undeclared variable, then a runtime error is encountered.
Undefined variables are those that are declared in the program but have not been given any value. If the program tries to read the value of an undefined variable, an undefined value is returned.
10. Write the code for adding new elements dynamically?
11. What are global variables? How are these variable declared and what are the problems associated with using them?
Global variables are those that are available throughout the length of the code, that is, these have no scope. The var keyword is used to declare a local variable or object. If the var keyword is omitted, a global variable is declared.
Example:
// Declare a global globalVariable = “Test”;
The problems that are faced by using global variables are the clash of variable names of local and global scope. Also, it is difficult to debug and test the code that relies on global variables.
12. What is a prompt box?
A prompt box is a box which allows the user to enter input by providing a text box.  Label and box will be provided to enter the text or number.
13. What is ‘this’ keyword in JavaScript?
‘This’ keyword refers to the object from where it was called.
14. Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?
Timers are used to execute a piece of code at a set time or also to repeat the code in a given interval of time. This is done by using the functions setTimeout, setInterval and clearInterval.
The setTimeout(function, delay) function is used to start a timer that calls a particular function after the mentioned delay. The setInterval(function, delay) function is used to repeatedly execute the given function in the mentioned delay and only halts when cancelled. The clearInterval(id) function instructs the timer to stop.
Timers are operated within a single thread, and thus events might queue up, waiting to be executed.
15. Which symbol is used for comments in Javascript?
// for Single line comments and
/*   Multi
Line
Comment
*/
16. What is the difference between ViewState and SessionState?
‘ViewState’ is specific to a page in a session.
‘SessionState’ is specific to user specific data that can be accessed across all pages in the web application.
17. What is === operator?
=== is called as strict equality operator which returns true when the two operands are having the same value without any type conversion.
18. Explain how can you submit a form using JavaScript?
To submit a form using JavaScript use document.form[0].submit();
document.form[0].submit();
19. Does JavaScript support automatic type conversion?
Yes JavaScript does support automatic type conversion, it is the common way of type conversion used by JavaScript developers
20. How can the style/class of an element be changed?
It can be done in the following way:
or
21. Explain how to read and write a file using JavaScript?
There are two ways to read and write a file using JavaScript
  • Using JavaScript extensions
  • Using a web page and Active X objects
 22. What are all the looping structures in JavaScript?
Following are looping structures in Javascript:
  • For
  • While
  • do-while loops
23. What is called Variable typing in Javascript?
Variable typing is used to assign a number to a variable and the same variable can be assigned to a string.
Example
This is called variable typing.
24. How can you convert the string of any base to integer in JavaScript?
The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter, and the second parameter is the base of the given string.
In order to convert 4F (of base 16) to integer, the code used will be –
25. Explain the difference between “==” and “===”?
“==” checks only for equality in value whereas “===” is a stricter equality test and returns false if either the value or the type of the two variables are different.
26. What would be the result of 3+2+”7″?
Since 3 and 2 are integers, they will be added numerically. And since 7 is a string, its concatenation will be done. So the result would be 57.
27. Explain how to detect the operating system on the client machine?
In order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used.
28. What do mean by NULL in Javascript?
The NULL value is used to represent no value or no object.  It implies no object or null string, no valid boolean value, no number and no array object.
29. What is the function of delete operator?
The functionality of delete operator is used to delete all variables and objects in a program but it cannot delete variables declared with VAR keyword.
30. What is an undefined value in JavaScript?
Undefined value means the
  • Variable used in the code doesn’t exist
  • Variable is not assigned to any value
  • Property doesn’t exist
31. What are all the types of Pop up boxes available in JavaScript?
  • Alert
  • Confirm and
  • Prompt
32. What is the use of Void(0)?
Void(0) is used to prevent the page from refreshing and parameter “zero” is passed while calling.
Void(0) is used to call another method without refreshing the page.
33. How can a page be forced to load another page in JavaScript?
The following code has to be inserted to achieve the desired effect:
34. What is the data type of variables of in JavaScript?
All variables in the JavaScript are object data types.
35. What is the difference between an alert box and a confirmation box?
An alert box displays only one button which is the OK button.
But a Confirmation box displays two buttons namely OK and cancel.
36. What are escape characters?
Escape characters (Backslash) is used when working with special characters like single quotes, double quotes, apostrophes and ampersands. Place backslash before the characters to make it display.
Example:
37. What are JavaScript Cookies?
Cookies are the small test files stored in a computer and it gets created when the user visits the websites to store information that they need. Example could be User Name details and shopping cart information from the previous visits.
38. Explain what is pop()method in JavaScript?
The pop() method is similar as the shift() method but the difference is that the Shift method works at the start of the array.  Also the pop() method take the last element off of the given array and returns it. The array on which is called is then altered.
Example:
var cloths = [“Shirt”, “Pant”, “TShirt”];
cloths.pop();
//Now cloth becomes Shirt,Pant
39. Whether JavaScript has concept level scope?
No. JavaScript does not have concept level scope. The variable declared inside the function has scope inside the function.
40. Mention what is the disadvantage of using innerHTML in JavaScript?
If you use innerHTML in JavaScript the disadvantage is
  • Content is replaced everywhere
  • We cannot use like “appending to innerHTML”
  • Even if you use +=like “innerHTML = innerHTML + ‘html’” still the old content is replaced by html
  • The entire innerHTML content is re-parsed and build into elements, therefore its much slower
  • The innerHTML does not provide validation and therefore we can potentially insert valid and broken HTML in the document and break it
41. What is break and continue statements?
Break statement exits from the current loop.
Continue statement continues with next statement of the loop.
42. What are the two basic groups of dataypes in JavaScript?

They are as –
  • Primitive
  • Reference types.
Primitive types are number and Boolean data types. Reference types are more complex types like strings and dates.
43. How generic objects can be created?
Generic objects can be created as:
44. What is the use of type of operator?
‘Typeof’ is an operator which is used to return a string description of the type of a variable.
45. Which keywords are used to handle exceptions?
Try… Catch—finally is used to handle exceptions in the JavaScript
46. Which keyword is used to print the text in the screen?
document.write(“Welcome”) is used to print the text – Welcome in the screen.
47. What is the use of blur function?
Blur function is used to remove the focus from the specified object.
48. What is variable typing?
Variable typing is used to assign a number to a variable and then assign string to the same variable. Example is as follows:
49. How to find operating system in the client machine using JavaScript?
The ‘Navigator.appversion’ is used to find the name of the operating system in the client machine.
50. What are the different types of errors in JavaScript?
There are three types of errors:
  • Load time errors: Errors which come up when loading a web page like improper syntax errors are known as Load time errors and it generates the errors dynamically.
  • Run time errors: Errors that come due to misuse of the command inside the HTML language.
  • Logical Errors: These are the errors that occur due to the bad logic performed on a function which is having different operation.
51. What is the use of Push method in JavaScript?
The push method is used to add or append one or more elements to the end of an Array. Using this method, we can append multiple elements by passing multiple arguments
52. What is unshift method in JavaScript?
Unshift method is like push method which works at the beginning of the array.  This method is used to prepend one or more elements to the beginning of the array.
53. What is the difference between JavaScript and Jscript?
Both are almost similar. JavaScript is developed by Netscape and Jscript was developed by Microsoft .

54. How are object properties assigned?
Properties are assigned to objects in the following way –
or
55. What is the ‘Strict’ mode in JavaScript and how can it be enabled?
Strict Mode adds certain compulsions to JavaScript. Under the strict mode, JavaScript shows errors for a piece of codes, which did not show an error before, but might be problematic and potentially unsafe. Strict mode also solves some mistakes that hamper the JavaScript engines to work efficiently.
Strict mode can be enabled by adding the string literal “use strict” above the file. This can be illustrated by the given example:
56. What is the way to get the status of a CheckBox?
The status can be acquired as follows –
alert(document.getElementById(‘checkbox1’).checked);
If the CheckBox will be checked, this alert will return TRUE.
57. How can the OS of the client machine be detected?
The navigator.appVersion string can be used to detect the operating system on the client machine.
58. Explain window.onload and onDocumentReady?
The onload function is not run until all the information on the page is loaded. This leads to a substantial delay before any code is executed.
onDocumentReady loads the code just after the DOM is loaded. This allows early manipulation of the code.
59. How will you explain closures in JavaScript? When are they used?
Closure is a locally declared variable related to a function which stays in memory when the function has returned.
For example:
60. How can a value be appended to an array?
A value can be appended to an array in the given manner –
arr[arr.length] = value;
61. Explain the for-in loop?
The for-in loop is used to loop through the properties of an object.
The syntax for the for-in loop is –
In each repetition, one property from the object is associated to the variable name, and the loop is continued till all the properties of the object are depleted.
62. Describe the properties of an anonymous function in JavaScript?
A function that is declared without any named identifier is known as an anonymous function. In general, an anonymous function is inaccessible after its declaration.
Anonymous function declaration –
63. What is the difference between .call() and .apply()?
The function .call() and .apply() are very similar in their usage except a little difference. .call() is used when the number of the function’s arguments are known to the programmer, as they have to be mentioned as arguments in the call statement. On the other hand, .apply() is used when the number is not known. The function .apply() expects the argument to be an array.
The basic difference between .call() and .apply() is in the way arguments are passed to the function. Their usage can be illustrated by the given example.
64. Define event bubbling?
JavaScript allows DOM elements to be nested inside each other. In such a case, if the handler of the child is clicked, the handler of parent will also work as if it were clicked too.
65. Is JavaScript case sensitive? Give an example?
Yes, JavaScript is case sensitive. For example, a function parseInt is not same as the function Parseint.
66. What boolean operators can be used in JavaScript?
The ‘And’ Operator (&&), ‘Or’  Operator (||) and the ‘Not’ Operator (!) can be used in JavaScript.
*Operators are without the parenthesis.
67. How can a particular frame be targeted, from a hyperlink, in JavaScript?
This can be done by including the name of the required frame in the hyperlink using the ‘target’ attribute.
68. What is the role of break and continue statements?
Break statement is used to come out of the current loop while the continue statement continues the current loop with a new recurrence.
69. Write the point of difference between web-garden and a web-farm?
Both web-garden and web-farm are web hosting systems. The only difference is that web-garden is a setup that includes many processors in a single server while web-farm is a larger setup that uses more than one server.
70. How are object properties assigned?
Assigning properties to objects is done in the same way as a value is assigned to a variable. For example, a form object’s action value is assigned as ‘submit’ in the following manner – Document.form.action=”submit”
71. What is the method for reading and writing a file in JavaScript?
This can be done by Using JavaScript extensions (runs from JavaScript Editor), example for opening of a file –
72. How are DOM utilized in JavaScript?
DOM stands for Document Object Model and is responsible for how various objects in a document interact with each other. DOM is required for developing web pages, which includes objects like paragraph, links, etc. These objects can be operated to include actions like add or delete. DOM is also required to add extra capabilities to a web page. On top of that, the use of API gives an advantage over other existing models.
73. How are event handlers utilized in JavaScript?
Events are the actions that result from activities, such as clicking a link or filling a form, by the user. An event handler is required to manage proper execution of all these events. Event handlers are an extra attribute of the object. This attribute includes event’s name and the action taken if the event takes place.
74. Explain the role of deferred scripts in JavaScript?
By default, the parsing of the HTML code, during page loading, is paused until the script has not stopped executing. It means, if the server is slow or the script is particularly heavy, then the webpage is displayed with a delay. While using Deferred, scripts delays execution of the script till the time HTML parser is running. This reduces the loading time of web pages and they get displayed faster.
75. What are the various functional components in JavaScript?
The different functional components in JavaScript are-
First-class functions: Functions in JavaScript are utilized as first class objects. This usually means that these functions can be passed as arguments to other functions, returned as values from other functions, assigned to variables or can also be stored in data structures.
Nested functions: The functions, which are defined inside other functions, are called Nested functions. They are called ‘everytime’ the main function is invoked.
76. Write about the errors shown in JavaScript?
JavaScript gives a message if it encounters an error. The recognized errors are –
  • Load-time errors: The errors shown at the time of the page loading are counted under Load-time errors. These errors are encountered by the use of improper syntax, and thus are detected while the page is getting loaded.
  • Run-time errors: This is the error that comes up while the program is running. It is caused by illegal operations, for example, division of a number by zero, or trying to access a non-existent area of the memory.
  • Logic errors: It is caused by the use of syntactically correct code, which does not fulfill the required task. For example, an infinite loop.
77. What are Screen objects?
Screen objects are used to read the information from the client’s screen. The properties of screen objects are –
  • AvalHeight: Gives the height of client’s screen
  • AvailWidth: Gives the width of client’s screen.
  • ColorDepth: Gives the bit depth of images on the client’s screen
  • Height: Gives the total height of the client’s screen, including the taskbar
  • Width: Gives the total width of the client’s screen, including the taskbar
78. Explain the unshift() method ?
This method is functional at the starting of the array, unlike the push(). It adds the desired number of elements to the top of an array. For example –
The output is shown below:
79. Define unescape() and escape() functions?
The escape () function is responsible for coding a string so as to make the transfer of the information from one computer to the other, across a network.
For Example:
Output: Hello%3F%20How%20are%20you%21
The unescape() function is very important as it decodes the coded string.
It works in the following way. For example:
Output: Hello? How are you!
80. What are the decodeURI() and encodeURI()?
EncodeURl() is used to convert URL into their hex coding. And DecodeURI() is used to convert the encoded URL back to normal.
Output –
my%20test.asp?name=st%C3%A5le&car=saab
my test.asp?name=ståle&car=saab
 81. Why it is not advised to use innerHTML in JavaScript?
innerHTML content is refreshed every time and thus is slower. There is no scope for validation in innerHTML and, therefore, it is easier to insert rouge code in the document and, thus, make the web page unstable.
82. What does the following statement declares?
It declares a three dimensional array.
83. How are JavaScript and ECMA Script related?
ECMA Script are like rules and guideline while Javascript is a scripting language used for web development.
84. What is namespacing in JavaScript and how is it used?
Namespacing is used for grouping the desired functions, variables etc. under a unique name. It is a name that has been attached to the desired functions, objects and properties. This improves modularity in the coding and enables code reuse.
85. How can JavaScript codes be hidden from old browsers that don’t support JavaScript?
For hiding JavaScript codes from old browsers:
Add “<!–” without the quotes in the code just after the <script> tag.
Add “//–>” without the quotes in the code just before the <script> tag.
Old browsers will now treat this JavaScript code as a long HTML comment. While, a browser that supports JavaScript, will take the “<!–” and “//–>” as one-line comments.