Category Archives: JavaScript

JavaScript codes

JavaScript Reviewer

2 Types: 1. Primitive – numbers, strings, booleans, null, undefined 2. Object Falsy values: 0, -0, NaN, “”, false, null, undefined Check for NaN: if(isNaN(varName)){…} Type Operators: typeof “…” – returns data type instanceof Events: document.getElementById(“id”).onclick = function(){…}; Add Many Event … Continue reading

Posted in JavaScript, Uncategorized | Leave a comment

Drum Kit

JS HTML CSS

Posted in JavaScript | Tagged | Leave a comment

Examples

Quiz System: code / better code ToDoList App: Watch&Code Drum Kit: code Clock: code Changing CSS Variables: code  

Posted in JavaScript | Leave a comment

Algorithm Scripting

Reverse a String Factorialize a Number  OR  Check for Palindromes Find the Longest Word in a String  OR  Capitalize all First Letter of the Words in a Sentence  OR  Return the Largest Numbers in Array  OR  Check Ending if the … Continue reading

Posted in JavaScript | Leave a comment

Best Practices

Always use lower case file names Place <script> before the </body> Declare all variables on top Use var once then comma(,) thereafter when declaring variables Save selections into variables: var $name = $(selector); Reduce activity in Loops code Reduce DOM Access code … Continue reading

Posted in JavaScript | Tagged , , , , , , , , ,

Reviewer

HTML5: link CSS: link Bootstrap: link JavaScript link jQuery: link AngularJS: link Algorithm Scripting: link    

Posted in JavaScript | Leave a comment

ES6

Declarations let & const – scoped to the nearest block and are not hoisted let – can be reassigned but cannot be redeclared within the same scope; use in for loops const – cannot be assigned a new value; must be assigned an initial … Continue reading

Posted in JavaScript | Leave a comment