JavaScript Objects JavaScript Objects An object is a collection of properties and methods withheld under one name. Properties Properties or attributes of an object describes the special features and identity. <script> var a="Hello people!"; document.write(a.length); </script> Result: 13 Methods Methods or...
JavaScript Events JavaScript Events A JavaScript function is a section of code that perform a specific task when called. Calling a function is achieved by its name. Syntax: function function_name() { function code } Example: <html> <head> <script> function helloFunction() {...
JavaScript Functions JavaScript Functions A JavaScript function is a section of code that perform a specific task when called. Calling a function is achieved by its name. Syntax: function function_name() { function code } Example: <html> <head> <script> function helloFunction() {...
JavaScript While Loop Statement JavaScript While Loop Statement While Loop statement is a repetitive statement which is executed after evaluating the condition. If the resulting value is true the the execution is repetead until becomes false. Syntax: while (condition){ If condition...
JavaScript For Loop Statement JavaScript For Loop Statement For Loop statement – is a loop statement that evaluates the expression. If it meets the condition of initialization then increment the value of initialization and repeat execution steps until no longer meets...