JS
challenger
JS
challenger
  • Getting Started
  • Overview
  • Random Challenge
  • Javascript Basics
    • - Sum two numbers
    • - Comparison operators, strict equality
    • - Get type of value
    • - Get nth character of string
    • - Remove first n characters of string
    • - Get last n characters of string
    • - Get first n characters of string
    • - Extract first half of string
    • - Remove last n characters of string
    • - Return the percentage of a number
    • - Basic JavaScript math operators
    • - Check if a number is even
    • - How many times does a character occur?
    • - Check if a number is a whole number
    • - Multiplication, division, and comparison operators
    • - Check whether a string contains another string and concatenate
    • - Round a number to 2 decimal places
    • - Split a number into its digits
    • - Clear up the chaos behind these strings
    • - Return the next higher prime number
    • - Find next higher natural number that is divisble by y
    • - Insert character after every n characters (backwards)
    • - Find the correct word by incrementing letters in alphabet
  • Javascript Arrays
  • Javascript Objects
  • Javascript Dates
  • Javascript Sets
  • Javascript DOM
    NEW
  • Challenge Rush
Imprint Privacy Policy

Sum two numbers

// Write a function that takes two numbers (a and b) as argument
// Sum a and b
// Return the result
function
myFunction
(
a, b
)
{

return
}
Test Cases:
myFunction(1,2)
Expected
3
myFunction(1,10)
Expected
11
myFunction(99,1)
Expected
100
Twitter_Logo_White-on-Blue
Follow