Table of Contents
JavaScript Questions
What is The difference between Var, Let, and Const?
https://codeburst.io/part-2-var-vs-const-vs-let-69ea73fe76c1
Is JavaScript Case Sensitive?
A: Yes, JavaScript is Case Sensitive
What are the Datatypes’ in JavaScript? – String, Number, object, Boolean, undefined, array
Declare a new array of strings: var cars = [“Saab”, “Volvo”, “BMW”];
Declare a new empty array: var x = new Array(5); // option to add a length perameter, is faster then var x = []
How to point to an external JavaScript file:
<script type="text/javascript" src="script.js"></script>
function myFunction(p1, p2)
{
return p1 * p2; // The function returns the product of p1 and p2
} (function(){ var a = b = 3;})(); console.log("a defined? " + (typeof a !== 'undefined'));console.log("b defined? " + (typeof b !== 'undefined'));
typeof "John" // Returns string
typeof 3.14 // Returns number
typeof false // Returns Boolean
typeof [1,2,3,4] // Returns object
typeof {name:'John', age:34} // Returns object
var person; // Value is undefined, type is undefined
document.getElementById("demo").innerHTML = "Hello Do";
var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"};
What is noconflict?
What is the significance of, and reason for, wrapping the entire content of a JavaScript source file in a function block? – help prevent naming errors
NaN – not a number.
What is a Prototype in JavaScripts
What is the significance, and what are the benefits, of including ‘use strict’ at the beginning of a JavaScript source file?- Stricter debugging, raises more errors
Evaluating equals signs:
https://www.w3schools.com/js/js_comparisons.asp
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness
How to comment lines in JavaScript: // is single line, /* */ is multi line
Test yourself: https://www.w3schools.com/quiztest/quiztest.asp?qtest=JavaScript
Angular 5
AngularCLI
Comands for node.js command prompt:
Generate new Components : “ng generate component home” OR “ng g c home”
Run local server : “ng serve”
Angular 5 Terms:
Interpelation: Using variables
1 way binding – Use the “{{modelObject}}”
2 way binding – Use “[{modelObject}]”
Templating and Styling –
Components –
Modules –
************* ANGULAR JS – START ***********
What is Angularjs – Data binding. Make pages more dynamic with less code. Utilizes module’s
Directives – To Create, Bind, and initialize data/functionality. Added to Html elements to declare AngularJS functionality
Expressions – Executable code. Enclosed in Mustaches
Controllers – Create in JavaScript
Ng-repeat – directive to cycle through a response object.
************* ANGULAR JS – END ***********
Bootstrap.
Bootstrap consists of HTML, CSS, of JS
Quiz Yourself at https://www.w3schools.com/bootstrap/bootstrap_quiz.asp
Resource
Related Navigation:
Return to main page: Interview Preparation Path – A Study Guide Index