This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>NBC Local Media Labs - Now</title> | |
| <!-- NBC Streeter key ABQIAAAAoSzeMDMiOMkt-jxr8_rKERQUIMrGlWh_71tuok4jKj85JkbBzhT3ur0BfzrRKoZKL9l5tfdWM1hdoA --> | |
| <!-- NBC LocalMediaLabs key ABQIAAAAoSzeMDMiOMkt-jxr8_rKERTqy0Wh1w9wKL2tZqSWsQEiKNCtcxQGg5Z42XKWomTbiL99SSrFgCYvUQ --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function unformatted() { | |
| function innerFunction(count) { | |
| while(count > 0) { | |
| count--; | |
| if(count===2) { | |
| console.log("count is two!"); | |
| } | |
| } | |
| console.log("are we still in the inner func?"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function undertocamel(undername) { | |
| var camelCaseOutput = ""; | |
| var foundUnder = false; | |
| for(var i = 0; i<undername.length; i++) { | |
| // undername[i]; | |
| if (undername[i] === "_") { | |
| foundUnder = true; | |
| } else { | |
| if (foundUnder) { | |
| camelCaseOutput += undername[i].toUpperCase(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function aFunction(num){ | |
| for(var i=0; i<num; i++){ | |
| if(i%2 === 0){ | |
| console.log("is even!"); | |
| }else{ | |
| console.log("is odd!"); | |
| } | |
| console.log("current number is ", i); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isDivisible(num1, num2){ | |
| var output=num1%num2;//console.log(output); | |
| if(num1===undefined || num2===undefined){ | |
| console.log("argument undefined"); | |
| return null; | |
| }else if(output===0){ | |
| return true; | |
| } | |
| else{ | |
| return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function converter(degrees){ | |
| var degreesCelsius = (degrees - 32) * (5 / 9); | |
| var degreesKelvin = degreesCelsius + 273.15; | |
| console.log(degrees + " degrees Fahrenheit"); | |
| console.log("equals " + degreesCelsius + " degrees Celsius"); | |
| console.log("equals " + degreesKelvin + " degrees Kelvin"); | |
| } | |
| //converter(77); | |
| function converter2(degrees){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function nicknameGenerator(fullName){ | |
| var nickName=""; | |
| var fullNameTemp=fullName.toLowerCase(); | |
| if(fullNameTemp[2]==="a" || | |
| fullNameTemp[2]==="e" || | |
| fullNameTemp[2]==="i" || | |
| fullNameTemp[2]==="o" || | |
| fullNameTemp[2]==="u"){ | |
| //log 4 letters | |
| nickName=fullName.slice(0,4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function bactrianCase(message){ | |
| var resultMessage=""; | |
| for(i=0;i<message.length;i++){ | |
| if(i%2===0){ | |
| resultMessage+=message[i].toUpperCase(); | |
| }else{ | |
| resultMessage+=message[i].toLowerCase(); | |
| } | |
| //(i%2===0) ? resultMessage+=message[i].toUpperCase() : resultMessage+=message[i].toLowerCase(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function count(n,m,direction){ | |
| //n is limit | |
| //m is interval | |
| //direction up or down | |
| if(direction==="up"){ | |
| for(var i=m; i<=n; i+=m){ | |
| console.log(i); | |
| } | |
| }else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fizzBuzz(num){ | |
| debugger; | |
| for(var i = 1;i <= num ;i++){ | |
| if(!(i%3) && !(i%5)){ | |
| console.log('fizzbuzz'); | |
| } else if (!(i%3)) { | |
| console.log('fizz'); | |
| } else if (!(i%5)) { | |
| console.log('buzz'); | |
| } else { |
OlderNewer