var _ac = ["Microsoft Tai Le", "indexedDbKey", "opera", "hypot", "click", "touchstart", "$chrome_asyncScriptInfo", "clearCache", "slice", "accelerationIncludingGravity", "navigator", "all", ',"auth" : "', "get_stop_signals", "to", "Menlo", "pact", "keydown", "isIgn", "search", "getStorageUpdates", "ArialHebrew-Light", "fontFamily", "webdriver", "tme_cnt", "requestMediaKeySystemAccess", "Buffer", "hostname", "cssText", "n_ck", "id", "ke_vel", "Futura", "POST", "-1,2,-94,-120,", "data", "listFunctions", "dma_throttle", "Mac OS X 10_5", "language", "Courier New", "rgb(120, 186, 176)", "body", "Windows Media Player Plug-in Dynamic Link Library", "-1,2,-94,-80,", "apply", "WebEx64 General Plugin Container", "vc_cnt", ",it0", "gf", "i1:", "pageX", "Lato", "_setAu", "sessionStorageKey", "Lobster", "disFpCalOnTimeout", "set_cookie", "WEBGL_debug_renderer_info", "strokeStyle", "Corsiva Hebrew", "rCFP", "documentElement", "__webdriver_unwrapped", ",s2:", "mn_stout", "required", "parseInt", "-1,2,-94,-106,", "_setPowState", "random", "payment-handler", "Press Start 2P", "bd", "indexOf", "fillText", "ActiveXObject", "cookie", "button", "mn_r", "mn_mc_lmt", "mact", "now", "pluginInfo", "$cdc_asdjflasutopfhvcZLmcfl_", "undef", "catch", "y1", "mozInnerScreenY", "accessibility-events", "getAttribute", "rotationRate", "timezoneOffsetKey", "__lastWatirConfirm", "gd", "-1,2,-94,-129,", "ta", "XMLHttpRequest", "colorDepth", "fontSize", "emit", "get_cookie", "push", "mduce_cnt", "width", "msHidden", "visibilitychange", "webkitvisibilitychange", "position: relative; left: -9999px; visibility: hidden; display: block !important", "-1", "bpd", "send", "rotate_right", "onreadystatechange", "__lastWatirAlert", "x2", "microphone", "ff", "setRequestHeader", "webkitGetGamepads", "mn_cd", "t_dis", "bmisc", "vc_cnt_lmt", "protocol", "touchcancel", "query", "Java Plug-in 2 for NPAPI Browsers", "hvc", "Chrome Remote Desktop Viewer", "api_public_key", "auth", "__driver_evaluate", ",s1:", "2", "wr", "vibrate", "fmh", "get_cf_date", "font", "fonts_optm", "mn_poll", ",loc:", "mduce_cnt_lmt", "pen", "sessionStorage", "doe_cnt", "ckie", "get_browser", "createElement", "fonts", "mn_cc", "do_dis", "__fxdriver_evaluate", "aj_indx", "fpValstr", "gb", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", "localStorageKey", "hasOwnProperty", "apicall_bm", "hbs", "==", "lvc", "pow", "-1,2,-94,-119,", "pe_vel", "onfocus", "doa_throttle", "afSbep8yjnZUjq3aL010jO15Sawj2VZfdYK8uY90uxq", "Geneva", "clientWidth", "cdoa", '{"session_id" : "', "webrtcKey", "default_session", "hmm", "ceil", "-1,2,-94,-105,", "join", "_phantom", "aj_lmt_tact", "#f60", "mn_get_new_challenge_params", "startTracking", "keyCode", "availWidth", "; path=/; expires=Fri, 01 Feb 2025 08:00:00 GMT;", "hmd", "cdma", "abs", "sed", "16pt Arial", "hidden", "toLowerCase", "fpcf", "plugins", "XPathResult", "/get_params", "init_time", "mn_w", "split", "e", "__$webdriverAsyncExecutor", "off", "fpVal", "offsetWidth", "persistent-storage", "toDataURL", "xagg", "document", "informinfo", "Basic ", "dme_cnt_lmt", "innerHeight", "htc", "pduce_cnt", "toFixed", "ir", "stringify", "webgl", "clipboard", "DeviceOrientationEvent", "magnetometer", "0a46G5m17Vrp4o4c", "defaultValue", ",", "abcdefhijklmnopqrstuvxyz1234567890;+-.", "mozIsLocallyAvailable", "Authorization", "Apple Gothic", "-", "exception", "imul", "Batang", "storeWebWideTrackingException", "patp", "callSelenium", "stroke", "3", "t_tst", "hpd", "Monaco", "csh", "-1,2,-94,-126,", ",s3:", "Wingdings 2", "cka", "alpha", "mr", "0", "htm", "addEventListener", "speaker", "input", "non:", "clipboard-write", "dm_dis", "doNotTrack", "-1,2,-94,-108,", "Microsoft Sans Serif", "sf4", "cdc_adoQpoasnfa76pfcZLmcfl_Symbol", "start_ts", "getParameter", "Roboto", "message", "mediaDevices", "firstLoad", ":", "dis", "hku", "SharePoint Browser Plug-in", "granted", "domAutomationController", "gwd", "lang", '\\\\"', "credentials", "-1,2,-94,-118,", "__webdriver_script_function", "onLine", "domAutomation", "loap", "-1,2,-94,-109,", "rir", "-1,2,-94,-122,", "cal_dis", "cs", "hpu", "AlNile", "target", "mme_cnt", "Default Browser Helper", "cma", "GET", "pointerType", "Lucida Sans", "iPad;", "_setBm", "altKey", "mn_rts", "gyroscope", "devicePixelRatio", "mn_state", "get_type", "\\'", "on", "storage", "rgb(102, 204, 0)", "rve", "Nimbus Roman No 9 L", "pointerdown", "div", "charAt", "clipboard-read", "sqrt", "watinExpressionResult", "removeChild", "-1,2,-94,-101,", "mozHidden", "DeviceMotionEvent", "mn_tcl", "vcact", "check_stop_protocol", "192px", "Version/4.0", "-1,2,-94,-111,", "msvisibilitychange", "__webdriver_script_func", "doact", "getGamepads", "TouchEvent", "td", "onkeyup", "applyFunc", "URL", "hmu", "sans-serif", "getElementsByTagName", "sendBeacon", "mozAlarms", "accelerometer", ",cpen:", "denied", "enGetLoc", "Apple LiGothic", "-1,2,-94,-110,", "then", "Waseem", "touchend", "span", "fillRect", "-1,2,-94,-121,", '"}', "splice", "-1,2,-94,-116,", "hasIndexedDB", "withCredentials", "hc", "background-sync", "-1,2,-94,-70,", "jrs", "style", "Avenir", "PI", "getforminfo", "tduce_cnt_lmt", "encode", "wgl", "mn_abck", "cdc_adoQpoasnfa76pfcZLmcfl_Array", "mn_get_current_challenges", "Native Client", "lastIndexOf", "awesomium", "shiftKey", "Chrome PDF Viewer", "1", "od", "onkeypress", "Open Sans", "canvas", "substring", "startdoadma", "//", "mn_ct", "hn", "", "z1", "pi", "hts", "onpointerdown", "mn_lc", "den", "mn_sen", "Noto", "_Selenium_IDE_Recorder", ",mn_w:", "_setFsp", "session_id", "password", "undefined", "ke_cnt_lmt", "hkd", "Fantasque Sans Mono", "mn_pr", "prototype", "uar", "bat:", "script", "x1", "geolocation", "cdc_adoQpoasnfa76pfcZLmcfl_Promise", "speechSynthesis", "getBattery", "ce_js_post", "mn_tout", "mme_cnt_lmt", "mn_mc_indx", "clientX", "z", "url", "_abck", "updatet", "Content-type", "dmact", "src", "cwen:", "productSub", "hkp", "_", "kact", '{"sensor_data":"', "sd_debug", "Microsoft Office Live Plug-in", "aj_indx_doact", "readyState", "availHeight", "acceleration", "http://", "pe_cnt", "FileReader", "loc", "asin", "-1,2,-94,-112,", "aj_type", "Source Sans Pro", "hb", "sort", "vc", ",s7:", "sc:", "toElement", "cookieEnabled", "parse", "90px", "serif", "getContext", "calc_fp", "Widevine Content Decryption Module", "~", "mn_ld", "iPhone", "Adobe Braille", "doe_vel", "geb", "New York", "pduce_cnt_lmt", "screen", ",setSDFN:", "Oswald", "2d", "wl", "isc:", "gamma", "registerProtocolHandler", "wrc:", "application/json", "mn_wt", "PLUGINS", "msManipulationViewsEnabled", "sdfn", "Century Gothic", "params_url", "get_mn_params_from_abck", "__phantomas", "m,Ev!xV67BaU> eh2m<f3AG3@", "-1,2,-94,-127,", "isTrusted", "aj_ss", "Shree Devanagari 714", "Constructor", "aj_indx_tact", "bdm", "Adobe Acrobat", "onblur", "OSMJIF", "is not a valid enum value of type PermissionName", "vib:", "Silverlight Plug-In", "__webdriverFuncgeb", "</setSDFN>", "spawn", "pd", "clientHeight", "weh", "Edge PDF Viewer", "-1,2,-94,-124,", "Courier", "mn_il", "dme_vel", "Java Applet Plug-in", "chknull", '"', "o9", "forEach", "__fxdriver_unwrapped", "replace", "t_en", "MSIE", "round", "keyup", "notifications", "nav_perm", "serviceWorker", "/_bm/_data", "location", ",0", "ssh", "getVoices", "clientY", "mn_s", "camera", "Century", "enReadDocUrl", "onclick", "Papyrus", "ambient-light-sensor", "rst", "; ", "number", "cns", "<bpd>", "cta", "attachEvent", "__webdriver_evaluate", "unk", "https:", "WebKit-integrierte PDF", "onkeydown", "midi", "mozPhoneNumberService", "mn_update_challenge_details", "function", "fm", "getExtension", "mozConnection", "arc", "-1,2,-94,-103,", "AdobeAAMDetect", "Birch Std", "Bodoni 72", "shift", "metaKey", "ver", "Cantarell", "mousemove", "te_cnt", "te_vel", "devicemotion", "UNMASKED_RENDERER_WEBGL", "cpa", "product", "__driver_unwrapped", "mn_lg", "mozRTCPeerConnection", "Monospace", "javaEnabled", "Candara", "fillStyle", "localStorage", "d2", "mn_ts", "fmz", "mn_al", "deviceorientation", "Palatino-Bold", "RealPlayer Version Plugin", "parse_gp", "webkitRTCPeerConnection", "selenium", "hardwareConcurrency", "Mozilla Default Plug-in", "HTMLElement", "n", "Palatino", "js_post", "fidcnt", "me_cnt", "which", "acos", "mousedown", "getStateField", "ITC Bodoni 72 Bold", "onmousemove", "webstore", "onmouseup", "UNMASKED_VENDOR_WEBGL", "hf", "__lastWatirPrompt", "prompt", "map", "email", "runFonts", "innerWidth", "requestWakeLock", "6pt Arial", "Calibri", "aj_lmt_dmact", "calledSelenium", "none", "mn_rt", "mouse", "fas", "<@nv45. F1n63r,Pr1n71n6!", "https://", "wv", "rVal", "offsetHeight", "innerHTML", "d3", "Avenir Next", "Damascus", "aj_indx_dmact", "psub", "pme_cnt_lmt", "bc", "TI-Nspire", "aj_lmt_doact", ";", "Shockwave for Director", "atanh", "prevfid", "Ubuntu Medium", "cc", "hte", "enAddHidden", "webkitTemporaryStorage", "gbrv", "value", "pointerup", "calledPhantom", "chrome", "height", "call", "opc:", "-1,2,-94,-123,", "Quicksand", "hasLocalStorage", "tme_cnt_lmt", "Comic Neue", "__selenium_unwrapped", "stack", "cf_url", "<setSDFN>", "ab", "bm", "__webdriver__chr", "dme_cnt", "tact", "ctrlKey", "ats", "Google Talk Plugin Video Renderer", "x12:", "callPhantom", "Serif", "iPhotoPhotocast", "tel", "-1,2,-94,-100,", "Droid Serif", "fmget_targets", "autocomplete", "watinExpressionError", "display", "ins", "Helvetica Neue", "toString", "pageY", "prod", "dm:", "onload", "documentMode", "x11:", "pme_cnt", "RTCPeerConnection", "getElementById", "brv", "spynner_additional_js_loaded", "}", "name", "hasSessionStorage", "beta", "pstate", "exp", "XDomainRequest", "indexedDB", "activeElement", "Unity Player", "Shockwave Flash", "currentScript", "Cambria", "me_vel", "fpValCalculated", "-1,2,-94,-117,", "brave", "encode_utf8", "sensor_data", "state", "QuickTime Plug-in", "dcs", "np", "pixelDepth", "b", "do_en", "plen", "userAgent", "open", "outerWidth", "altFonts", "childNodes", "dm_en", "PointerEvent", "getFloatVal", "Ubuntu Regular", "Bell MT", "cookie_chk_read", "hbCalc", "string", "Gill Sans MT", "tst", "device-info", "mn_lcl", "appendChild", "floor", "type", "cbrt", "Times", "RealPlayer(tm) G2 LiveConnect-Enabled Plug-In (32-bit)", "mmmmmmmmlli", "y", "__webdriver_script_fn", "cache", "bm-telemetry", "mouseup", "getElementsByName", "YouTube Plug-in", "getTimezoneOffset", "driver", "mozvisibilitychange", "onpointerup", "__selenium_evaluate", ",uaend,", "isBrave", "<init/>", "voiceURI", "=", "/", "fsp", "keypress", "permissions", "getmr", "getdurl", "-1,2,-94,-102,", "appMinorVersion", "webkitHidden", "charCodeAt", "mn_psn", "tduce_cnt", "charCode", "doadma_en", "monospace", "mn_init", "default", "aeiouy13579", "bind", "-1,2,-94,-114,", "wen", "text", '","sensor_data" : "', "event", "appVersion", "x", "Adobe Hebrew", "-1,2,-94,-115,", "onmousedown", "doe_cnt_lmt", "__nightmare", "length", "touchmove", "Microsoft.XMLHTTP", "||", "Google Earth Plug-in", "Minion Pro", "fromCharCode", "fc:", "getSupportedExtensions", "bluetooth", "ke_cnt", "</bpd>"]; console.log(_ac[626],_ac[440])
Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.
Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function(line){
console.log("Hello, " + line);
});
Keyword | Description | Scope |
---|---|---|
var | Var is used to declare variables(old way of declaring variables) | Function or global scope |
let | let is also used to declare variables(new way) | Global or block Scope |
const | const is used to declare const values. Once the value is assigned, it can not be modified | Global or block Scope |
let greetings = `Hello ${name}`
const msg = `
hello
world!
`
An array is a collection of items or values.
let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);
let mobiles = ["iPhone", "Samsung", "Pixel"];
// accessing an array
console.log(mobiles[0]);
// changing an array element
mobiles[3] = "Nokia";
Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.
() => expression
const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
.map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);
let [firstName, lastName] = ['Foo', 'Bar']
let {firstName, lastName} = {
firstName: 'Foo',
lastName: 'Bar'
}
const {
title,
firstName,
lastName,
...rest
} = record;
//Object spread
const post = {
...options,
type: "new"
}
//array spread
const users = [
...adminUsers,
...normalUsers
]
function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
console.log(`Hello ${name}!`);
}
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar
IF is used to execute a block of code based on a condition.
if(condition){
// code
}
Else part is used to execute the block of code when the condition fails.
if(condition){
// code
} else {
// code
}
Switch is used to replace nested If-Else statements.
switch(condition){
case 'value1' :
//code
[break;]
case 'value2' :
//code
[break;]
.......
default :
//code
[break;]
}
For loop is used to iterate a set of statements based on a condition.
for(Initialization; Condition; Increment/decrement){
//code
}
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while (condition) {
// code
}
Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.
do {
// code
} while (condition);
ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.
class className {
constructor() { ... } //Mandatory Class method
method1() { ... }
method2() { ... }
...
}
class Mobile {
constructor(model) {
this.name = model;
}
}
mbl = new Mobile("iPhone");