Posts by Rodolpho Bravo • 97 points
5 posts
-
0
votes3
answers784
viewsQ: How to return an object using the object name as a function parameter?
good night! Can anyone tell me how to return the object using a type invocation: book (booklet 1); function book(bookName) { var obj = { livro1: { quantidadePaginas: 300, autor: "Jorge", editora:…
-
6
votes3
answers3064
viewsQ: Count of occurrences in a String
How do I write a function that receives a string as argument, and returns an object listing the number of occurrences in the current string ? Currently I have this: charCount("hello"); // { // "h":…
javascriptasked Rodolpho Bravo 97 -
0
votes1
answer617
viewsQ: Chrome locks with correct Javascript loop
I’m trying to run the following code, only I can’t! It’s like the browser stops working. var scores = [60, 50, 60, 58, 54, 54, 58, 50, 52, 54, 48, 69, 34, 55, 51, 52, 44, 51, 69, 64, 66, 55, 52, 61,…
javascriptasked Rodolpho Bravo 97 -
1
votes3
answers2431
viewsA: Fizzbuzz test in Javascript
I was able to find the problem of my code! Everything was a } in the wrong place! To be documented, the functional code looks like this: var n = 1; while (n <= 100) { if ((n % 3) == 0 || (n % 5)…
javascriptanswered Rodolpho Bravo 97 -
1
votes3
answers2431
viewsQ: Fizzbuzz test in Javascript
I am trying to take the test "FIZZBUZZ" which consists of the following: Write a program that prints the Numbers from 1 to 100. But for multiples of three print "Fizz" Instead of the number and for…
javascriptasked Rodolpho Bravo 97