Skip to content

Instantly share code, notes, and snippets.

View KrishnaPrasath's full-sized avatar
🏠
Working from home

Murdoc KrishnaPrasath

🏠
Working from home
View GitHub Profile
@KrishnaPrasath
KrishnaPrasath / 1-one-row-expressions.js
Created June 14, 2019 05:31 — forked from lahdo/1-one-row-expressions.js
Javascript tricky questions. Check yourself. Or destroy any interviewee.
// https://jsfiddle.net/vk35ok2o/50/
console.log('typeof 1/0 => ', typeof 1/0);
console.log('typeof (1/0) => ', typeof (1/0));
console.log('1/0 => ', 1/0);
console.log('"Hello" * 2 => ', "Hello" * 2);
console.log('typeof ("Hello" * 2) => ', typeof ("Hello" * 2));
console.log('typeof "Hello" * 2 => ', typeof "Hello" * 2);
console.log('typeof undefined => ', typeof undefined);
console.log('typeof null => ', typeof null);
console.log('typeof function(){} => ', typeof function(){});