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
class OperacoesBasicas { | |
soma(numeros) { | |
let i; | |
let totalSoma = 0; | |
for (i = 0; i < numeros.length; i++) { | |
totalSoma += numeros[i]; | |
} | |
return totalSoma; |
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 divisao(numero, dividendo) { | |
return numero/dividendo; | |
} |
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 soma(numeros) { | |
let totalSoma = 0; | |
let i; | |
for (i = 0; i < numeros.length; i++) { | |
totalSoma += numeros[i]; | |
} | |
return totalSoma; | |
} |
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
// JavaScript Document | |
window.onload = function(){ | |
navigatorUsed = navigator.appName; | |
URL = new Array(); | |
URL[0] = "services.xml"; | |
tags = new Array(); | |
tags[0] = "li"; | |
tags[1] = "p"; |
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
let a = new RegExp(/country\,/, 'gi'); | |
console.log(a.source); | |
a.source === 'country\,' // false | |
a.source == 'country\,' // 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
let regex = /country\,/gi; | |
console.log(regex.source) // country\, (In nodejs is country\\,) | |
regex.source == ‘country\,’; //false | |
regex.source === ‘country\,’; //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
"use strict"; | |
var Person = (function () { | |
function Person(firstName, lastName) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
; | |
Object.defineProperty(Person.prototype, "fullName", { |
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
"use strict"; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | |
var Person = function () { | |
function Person(firstName, lastName) { | |
_classCallCheck(this, Person); |
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
doskey alias = doskey $* | |
doskey cat = type $* | |
doskey clear = cls | |
doskey cp = copy $* | |
doskey cpr = xcopy $* | |
doskey grep = find $* | |
doskey history = doskey /history | |
doskey kill = taskkill /PID $* | |
doskey ls = dir $* | |
doskey man = help $* |
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
var fatorDesq; | |
var rs = this.getField("rs").value; | |
var rt = this.getField("rt").value; | |
var st = this.getField("st").value; | |
var valores = [rs, rt, st]; | |
valores.sort(function(maior, menor) { | |
if (maior > menor) return -1; | |
if (maior < menor) return 1; | |
if (maior === menor) return 0; |