Home
Javascript Fundamentals
# Javascript basics
# Javascript arrays
# Javascript objects
# Javascript dates
# Javascript Sets
Javascript DOM
# DOM selector methods
# Events and user interactions
# DOM manipulation
# DOM fundamentals
# Recursive functions
Challenge Rush
Random Challenge
// Write a function that takes two strings (a and b) as arguments// If a contains b, append b to the beginning of a// If not, append it to the end// Return the concatenation function myFunction ( a, b ) { return }
return
myFunction('cheese', 'cake')
'cheesecake'
myFunction('lips', 's')
'slips'
myFunction('Java', 'script')
'Javascript'
myFunction(' think, therefore I am', 'I')
'I think, therefore I am'