Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

/ *

Métodos de array - .join ()

-------------------------

Complete a função de capitalização

Deve retornar uma string com a primeira letra em maiúscula

Por exemplo, capitailise ("hello") deve retornar "Hello"

Dica: use o método de string .split () e o método de array .join ()

* /

 

 

function capitalise(str) {}

/*

DO NOT EDIT BELOW THIS LINE

--------------------------- */

var name = "daniel";

console.log(capitalise(name));

console.log(capitalise("hello"));

 

/ *

RESULTADO ESPERADO

---------------

Daniel

Olá

* /

/ *

Métodos de array - .includes ()

---------------------------

Complete a função abaixo para verificar se um país está no Reino Unido

* /

 

 

var ukNations = ["Scotland", "Wales", "England", "Northern Ireland"];

function isInUK(country) {

return; // complete this statement

}

/*

DO NOT EDIT BELOW THIS LINE

--------------------------- */

console.log(isInUK("France"));

console.log(isInUK("Republic of Ireland"));

console.log(isInUK("England"));

 


/ *

RESULTADO ESPERADO

---------------

falso

falso

verdade

* /

#27

welligton costa
Module by welligton costa, updated more than 1 year ago
No tags specified